Print this page
11909 THREAD_KPRI_RELEASE does nothing of the sort
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/ia32/os/syscall.c
          +++ new/usr/src/uts/intel/ia32/os/syscall.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  /*
  23   23   * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2019 Joyent, Inc.
  24   25   */
  25   26  
  26   27  #include <sys/param.h>
  27   28  #include <sys/vmparam.h>
  28   29  #include <sys/types.h>
  29   30  #include <sys/sysmacros.h>
  30   31  #include <sys/systm.h>
  31   32  #include <sys/signal.h>
  32   33  #include <sys/stack.h>
  33   34  #include <sys/cred.h>
↓ open down ↓ 1161 lines elided ↑ open up ↑
1195 1196          krwlock_t *module_lock;
1196 1197          int code, error = 0;
1197 1198  
1198 1199          code = curthread->t_sysnum;
1199 1200          callp = se + code;
1200 1201  
1201 1202          /*
1202 1203           * Try to autoload the system call if necessary
1203 1204           */
1204 1205          module_lock = lock_syscall(se, code);
1205      -        THREAD_KPRI_RELEASE();  /* drop priority given by rw_enter */
1206 1206  
1207 1207          /*
1208 1208           * we've locked either the loaded syscall or nosys
1209 1209           */
1210 1210  
1211 1211          if (lwp_getdatamodel(lwp) == DATAMODEL_NATIVE) {
1212 1212  #if defined(_LP64)
1213 1213                  if (callp->sy_flags & SE_ARGC) {
1214 1214                          rval = (int64_t)(*callp->sy_call)(a0, a1, a2, a3,
1215 1215                              a4, a5);
↓ open down ↓ 11 lines elided ↑ open up ↑
1227 1227                          rval = set_errno(error);
1228 1228                  } else if (callp->sy_flags & SE_ARGC) {
1229 1229                          rval = (int64_t)(*callp->sy_call)(lwp->lwp_ap[0],
1230 1230                              lwp->lwp_ap[1], lwp->lwp_ap[2], lwp->lwp_ap[3],
1231 1231                              lwp->lwp_ap[4], lwp->lwp_ap[5]);
1232 1232                  } else {
1233 1233                          rval = syscall_ap();
1234 1234                  }
1235 1235          }
1236 1236  
1237      -        THREAD_KPRI_REQUEST();  /* regain priority from read lock */
1238 1237          rw_exit(module_lock);
1239 1238          return (rval);
1240 1239  }
1241 1240  
1242 1241  /*
1243 1242   * Indirect syscall handled in libc on x86 architectures
1244 1243   */
1245 1244  int64_t
1246 1245  indir()
1247 1246  {
↓ open down ↓ 153 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX