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/crypto/api/kcf_random.c
          +++ new/usr/src/uts/common/crypto/api/kcf_random.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  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  /*
  22   22   * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  24      - * Copyright (c) 2015, Joyent, Inc.
       24 + * Copyright 2017 Joyent, Inc.
  25   25   */
  26   26  
  27   27  /*
  28   28   * This file implements the interfaces that the /dev/random
  29   29   * driver uses for read(2), write(2) and poll(2) on /dev/random or
  30   30   * /dev/urandom. It also implements the kernel API - random_add_entropy(),
  31   31   * random_add_pseudo_entropy(), random_get_pseudo_bytes()
  32   32   * and random_get_bytes().
  33   33   *
  34   34   * We periodically collect random bits from providers which are registered
↓ open down ↓ 880 lines elided ↑ open up ↑
 915  915  
 916  916          if (events & (POLLIN | POLLRDNORM)) {
 917  917                  /*
 918  918                   * Sampling of rnbyte_cnt is an atomic
 919  919                   * operation. Hence we do not need any locking.
 920  920                   */
 921  921                  if (rnbyte_cnt >= MINEXTRACTBYTES)
 922  922                          *reventsp |= (events & (POLLIN | POLLRDNORM));
 923  923          }
 924  924  
 925      -        if (*reventsp == 0 && !anyyet)
      925 +        if ((*reventsp == 0 && !anyyet) || (events & POLLET))
 926  926                  *phpp = &rnd_pollhead;
 927  927  }
 928  928  
 929  929  /*ARGSUSED*/
 930  930  static void
 931  931  rnd_handler(void *arg)
 932  932  {
 933  933          int len = 0;
 934  934  
 935  935          if (!rng_prov_found && rng_ok_to_log) {
↓ open down ↓ 172 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX