summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/uadmin.c
diff options
context:
space:
mode:
authorraf <none@none>2005-08-21 09:47:45 -0700
committerraf <none@none>2005-08-21 09:47:45 -0700
commit97eda132fb49582e04504d6a221b98750a14f5b3 (patch)
tree90932c3ea45a238046b424e8d6128a831a38a8b2 /usr/src/uts/common/syscall/uadmin.c
parent88485144e0c16f378895536e5ea6cd0b331a2cc7 (diff)
downloadillumos-joyent-97eda132fb49582e04504d6a221b98750a14f5b3.tar.gz
6272865 race condition between SIGKILL and /proc PCAGENT
Diffstat (limited to 'usr/src/uts/common/syscall/uadmin.c')
-rw-r--r--usr/src/uts/common/syscall/uadmin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/uts/common/syscall/uadmin.c b/usr/src/uts/common/syscall/uadmin.c
index 298a9439c9..5c537d788b 100644
--- a/usr/src/uts/common/syscall/uadmin.c
+++ b/usr/src/uts/common/syscall/uadmin.c
@@ -19,6 +19,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -171,7 +172,8 @@ kadmin(int cmd, int fcn, void *mdep, cred_t *credp)
* from a user context, however if we are calling kadmin() from
* a kernel context then we do not release these resources.
*/
- if (ttoproc(curthread) != &p0) {
+ if (p != &p0) {
+ proc_is_exiting(p);
if ((error = exitlwps(0)) != 0)
return (error);
mutex_enter(&p->p_lock);