summaryrefslogtreecommitdiffstats
path: root/sys/compat/linprocfs
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-07 03:37:06 +0000
committerjhb <jhb@FreeBSD.org>2001-03-07 03:37:06 +0000
commit9cd254601baefc2dc9c953abe9747717374ff8b1 (patch)
treeac4298224e8af28e8b2f904a43a2925c21dfc798 /sys/compat/linprocfs
parentace71d59bf35fa6d911520ec855d0100773422a8 (diff)
downloadFreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.zip
FreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.tar.gz
Grab the process lock while calling psignal and before calling psignal.
Diffstat (limited to 'sys/compat/linprocfs')
-rw-r--r--sys/compat/linprocfs/linprocfs_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linprocfs/linprocfs_vnops.c b/sys/compat/linprocfs/linprocfs_vnops.c
index 55e3f52..722544a 100644
--- a/sys/compat/linprocfs/linprocfs_vnops.c
+++ b/sys/compat/linprocfs/linprocfs_vnops.c
@@ -300,13 +300,13 @@ linprocfs_ioctl(ap)
PROC_UNLOCK(procp);
return EINVAL; /* Can only start a stopped process */
}
- PROC_UNLOCK(procp);
if ((signo = *(int*)ap->a_data) != 0) {
- if (signo >= NSIG || signo <= 0)
+ if (signo >= NSIG || signo <= 0) {
+ PROC_UNLOCK(procp);
return EINVAL;
+ }
psignal(procp, signo);
}
- PROC_LOCK(procp);
procp->p_step = 0;
PROC_UNLOCK(procp);
wakeup(&procp->p_step);
OpenPOWER on IntegriCloud