Print this page
8634 epoll fails to wake on certain edge-triggered conditions
8635 epoll should not emit POLLNVAL
8636 recursive epoll should emit EPOLLRDNORM
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/random.c
          +++ new/usr/src/uts/common/io/random.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   *
  21   21   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  22   22   * Use is subject to license terms.
       23 + *
       24 + * Copyright 2017 Joyent, Inc.
  23   25   */
  24   26  
  25   27  
  26   28  /*
  27   29   * Random number generator pseudo-driver
  28   30   *
  29   31   * This is a lightweight driver which calls in to the Kernel Cryptographic
  30   32   * Framework to do the real work. Kernel modules should NOT depend on this
  31   33   * driver for /dev/random kernel API.
  32   34   *
↓ open down ↓ 289 lines elided ↑ open up ↑
 322  324      struct pollhead **phpp)
 323  325  {
 324  326          switch (getminor(dev)) {
 325  327          case DEVURANDOM:
 326  328                  *reventsp = events & (POLLOUT | POLLIN | POLLRDNORM);
 327  329  
 328  330                  /*
 329  331                   * A non NULL pollhead pointer should be returned in case
 330  332                   * user polls for 0 events.
 331  333                   */
 332      -                if (*reventsp == 0 && !anyyet)
      334 +                if ((*reventsp == 0 && !anyyet) || (events & POLLET))
 333  335                          *phpp = &urnd_pollhd;
 334  336  
 335  337                  break;
 336  338          case DEVRANDOM:
 337  339                  kcf_rnd_chpoll(events, anyyet, reventsp, phpp);
 338  340                  break;
 339  341          default:
 340  342                  return (ENXIO);
 341  343          }
 342  344  
 343  345          return (0);
 344  346  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX