summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_signal.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2008-05-01 11:53:25 +0000
committermiod <miod@openbsd.org>2008-05-01 11:53:25 +0000
commit66cdf0ad4db4e58d94dfe6d27b98666eac2887a1 (patch)
treee51906c32ecd890a2c03883c4dfe4898150ff523 /sys/compat/linux/linux_signal.c
parentImplement a nop IPI to signal other CPUs. (diff)
downloadwireguard-openbsd-66cdf0ad4db4e58d94dfe6d27b98666eac2887a1.tar.xz
wireguard-openbsd-66cdf0ad4db4e58d94dfe6d27b98666eac2887a1.zip
spl0() is not your friend, use splx() instead.
Diffstat (limited to 'sys/compat/linux/linux_signal.c')
-rw-r--r--sys/compat/linux/linux_signal.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 96917b0d0c1..145ae4ca70f 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_signal.c,v 1.12 2003/02/25 09:10:27 tedu Exp $ */
+/* $OpenBSD: linux_signal.c,v 1.13 2008/05/01 11:53:26 miod Exp $ */
/* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */
/*
@@ -583,6 +583,7 @@ linux_sys_sigprocmask(p, v, retval)
linux_old_sigset_t ss;
sigset_t bs;
int error = 0;
+ int s;
*retval = 0;
@@ -602,7 +603,7 @@ linux_sys_sigprocmask(p, v, retval)
linux_old_to_bsd_sigset(&ss, &bs);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case LINUX_SIG_BLOCK:
@@ -622,7 +623,7 @@ linux_sys_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return (error);
}
@@ -642,6 +643,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
linux_sigset_t ls;
sigset_t bs;
int error = 0;
+ int s;
if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
return (EINVAL);
@@ -664,7 +666,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
linux_to_bsd_sigset(&ls, &bs);
- (void) splhigh();
+ s = splhigh();
switch (SCARG(uap, how)) {
case LINUX_SIG_BLOCK:
@@ -684,7 +686,7 @@ linux_sys_rt_sigprocmask(p, v, retval)
break;
}
- (void) spl0();
+ splx(s);
return (error);
}
@@ -724,15 +726,16 @@ linux_sys_sigsetmask(p, v, retval)
} */ *uap = v;
linux_old_sigset_t mask;
sigset_t bsdsig;
+ int s;
bsd_to_linux_old_sigset(&p->p_sigmask, (linux_old_sigset_t *)retval);
mask = SCARG(uap, mask);
bsd_to_linux_old_sigset(&bsdsig, &mask);
- splhigh();
+ s = splhigh();
p->p_sigmask = bsdsig & ~sigcantmask;
- spl0();
+ splx(s);
return (0);
}