From 9579e8c145060077d6bf7a308b254a4a28be8a8e Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 25 Aug 2000 22:28:08 +0000 Subject: [PATCH] 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. --- sys/kern/uipc_mbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index ee0b58ced472..2db80b281dd6 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