Print this page
3830 SIGQUEUE_MAX's limit of 32 is too low
Reviewed by: Cedric Blancher <cedric.blancher@gmail.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Irek Szczesniak <iszczesniak@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/syscall/sysconfig.c
          +++ new/usr/src/uts/common/syscall/sysconfig.c
↓ open down ↓ 39 lines elided ↑ open up ↑
  40   40  #include <sys/resource.h>
  41   41  #include <sys/ulimit.h>
  42   42  #include <sys/unistd.h>
  43   43  #include <sys/debug.h>
  44   44  #include <sys/cpuvar.h>
  45   45  #include <sys/mman.h>
  46   46  #include <sys/timer.h>
  47   47  #include <sys/zone.h>
  48   48  #include <sys/vm_usage.h>
  49   49  
       50 +extern rctl_hndl_t rc_process_sigqueue;
       51 +
  50   52  long
  51   53  sysconfig(int which)
  52   54  {
  53   55          switch (which) {
  54   56  
  55   57          /*
  56   58           * if it is not handled in mach_sysconfig either
  57   59           * it must be EINVAL.
  58   60           */
  59   61          default:
↓ open down ↓ 73 lines elided ↑ open up ↑
 133  135          case _CONFIG_RTSIG_MAX:
 134  136                  return (_SIGRTMAX - _SIGRTMIN + 1);
 135  137  
 136  138          case _CONFIG_SEM_NSEMS_MAX:
 137  139                  return (_SEM_NSEMS_MAX);
 138  140  
 139  141          case _CONFIG_SEM_VALUE_MAX:
 140  142                  return (_SEM_VALUE_MAX);
 141  143  
 142  144          case _CONFIG_SIGQUEUE_MAX:
 143      -                return (_SIGQUEUE_MAX);
      145 +                /*
      146 +                 * Maximum number of outstanding queued signals.
      147 +                 */
      148 +                {
      149 +                        rlim64_t sigqsz_max;
      150 +                        mutex_enter(&curproc->p_lock);
      151 +                        sigqsz_max = rctl_enforced_value(rc_process_sigqueue,
      152 +                            curproc->p_rctls, curproc);
      153 +                        mutex_exit(&curproc->p_lock);
      154 +                        return ((uint_t)sigqsz_max);
      155 +                }
 144  156  
 145  157          case _CONFIG_SIGRT_MIN:
 146  158                  return (_SIGRTMIN);
 147  159  
 148  160          case _CONFIG_SIGRT_MAX:
 149  161                  return (_SIGRTMAX);
 150  162  
 151  163          case _CONFIG_TIMER_MAX:
 152  164                  return (timer_max);
 153  165  
↓ open down ↓ 60 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX