summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_mbuf.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-08-25 22:28:08 +0000
committerpeter <peter@FreeBSD.org>2000-08-25 22:28:08 +0000
commit84c0ff464eab1e6a55fde75c0b55fbe2e0dcc2a2 (patch)
tree7b57c50915c336c3205318b83bcadce5bee4ebcc /sys/kern/uipc_mbuf.c
parentd9362d87174823461005a87a1f42268e10efa9d5 (diff)
downloadFreeBSD-src-84c0ff464eab1e6a55fde75c0b55fbe2e0dcc2a2.zip
FreeBSD-src-84c0ff464eab1e6a55fde75c0b55fbe2e0dcc2a2.tar.gz
m_mballoc_wait() had a spl/tsleep race. mbufs can be freed in interrupt
context, which can cause a wakeup.. which can race with this.
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r--sys/kern/uipc_mbuf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index ee0b58c..2db80b2 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -249,9 +249,11 @@ m_mballoc_wait(int caller, int type)
struct mbuf *p;
int s;
+ s = splimp();
m_mballoc_wid++;
if ((tsleep(&m_mballoc_wid, PVM, "mballc", mbuf_wait)) == EWOULDBLOCK)
m_mballoc_wid--;
+ splx(s);
/*
* Now that we (think) that we've got something, we will redo an
OpenPOWER on IntegriCloud