diff options
| author | 2011-07-07 18:11:23 +0000 | |
|---|---|---|
| committer | 2011-07-07 18:11:23 +0000 | |
| commit | 22bce29c5f9a889e73b7b15a16f9b2c974ce4862 (patch) | |
| tree | 6fe2c40648127dcc8f672801d4db46d874a7df41 /sys/kern/kern_sig.c | |
| parent | effectively revert 1.44. we don't need the compat_43 syscall returns ever. (diff) | |
| download | wireguard-openbsd-22bce29c5f9a889e73b7b15a16f9b2c974ce4862.tar.xz wireguard-openbsd-22bce29c5f9a889e73b7b15a16f9b2c974ce4862.zip | |
There is a bunch of places in the kernel entry points where we don't
hold the kernel lock, but still need call one function that needs it.
Instead of grabbing the lock all over the place, move the locks into
the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret,
systrace_redirect and ADDUPROF. In the cases we already hold the biglock
we'll just recurse.
kettenis@, beck@ ok
Diffstat (limited to 'sys/kern/kern_sig.c')
| -rw-r--r-- | sys/kern/kern_sig.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 4d747c2f826..c0b5f18dc3f 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.123 2011/07/06 21:41:37 art Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.124 2011/07/07 18:11:24 art Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -726,9 +726,11 @@ void trapsignal(struct proc *p, int signum, u_long code, int type, union sigval sigval) { - struct sigacts *ps = p->p_sigacts; + struct sigacts *ps; int mask; + KERNEL_LOCK(); + ps = p->p_sigacts; mask = sigmask(signum); if ((p->p_flag & P_TRACED) == 0 && (ps->ps_sigcatch & mask) != 0 && (p->p_sigmask & mask) == 0) { @@ -758,6 +760,7 @@ trapsignal(struct proc *p, int signum, u_long code, int type, p->p_sigval = sigval; ptsignal(p, signum, STHREAD); } + KERNEL_UNLOCK(); } /* |
