summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_pipe.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-02-26 00:18:22 +0000
committerrwatson <rwatson@FreeBSD.org>2004-02-26 00:18:22 +0000
commit50cda1680380cd332bc897ddc8f54d65ddf9aa9d (patch)
tree06698496c09009ade82b0773f183efaf7e38cd44 /sys/kern/sys_pipe.c
parentc305cc0659964f6dd3370760ce115117460a1c09 (diff)
downloadFreeBSD-src-50cda1680380cd332bc897ddc8f54d65ddf9aa9d.zip
FreeBSD-src-50cda1680380cd332bc897ddc8f54d65ddf9aa9d.tar.gz
Assert pipe mutex in pipeselwakeup(), as we manipulate pipe_state
in a non-atomic manner. It appears to always be called with the mutex (good).
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r--sys/kern/sys_pipe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 2a5479f..3dfd6e1 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -478,6 +478,7 @@ pipeselwakeup(cpipe)
struct pipe *cpipe;
{
+ PIPE_LOCK_ASSERT(cpipe, MA_OWNED);
if (cpipe->pipe_state & PIPE_SEL) {
cpipe->pipe_state &= ~PIPE_SEL;
selwakeuppri(&cpipe->pipe_sel, PSOCK);
OpenPOWER on IntegriCloud