summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-11-26 21:39:57 +0000
committerderaadt <deraadt@openbsd.org>2008-11-26 21:39:57 +0000
commit4b180dfd13f59a9eb9ce2371c93129957f44cd8c (patch)
tree9be60ce942518b5a02ae9bc9212e923067ac7ad9 /sys
parentAvoid network livelock. (diff)
downloadwireguard-openbsd-4b180dfd13f59a9eb9ce2371c93129957f44cd8c.tar.xz
wireguard-openbsd-4b180dfd13f59a9eb9ce2371c93129957f44cd8c.zip
only the pool_get() needs to be spl protected; ok claudio dlg
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_mbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index ffde4c32209..08ed4b4f154 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.103 2008/11/25 19:09:34 claudio Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.104 2008/11/26 21:39:57 deraadt Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -187,6 +187,7 @@ m_get(int nowait, int type)
s = splvm();
m = pool_get(&mbpool, nowait == M_WAIT ? PR_WAITOK : 0);
+ splx(s);
if (m) {
m->m_type = type;
mbstat.m_mtypes[type]++;
@@ -195,7 +196,6 @@ m_get(int nowait, int type)
m->m_data = m->m_dat;
m->m_flags = 0;
}
- splx(s);
return (m);
}
@@ -211,6 +211,7 @@ m_gethdr(int nowait, int type)
s = splvm();
m = pool_get(&mbpool, nowait == M_WAIT ? PR_WAITOK : 0);
+ splx(s);
if (m) {
m->m_type = type;
mbstat.m_mtypes[type]++;
@@ -232,7 +233,6 @@ m_gethdr(int nowait, int type)
m->m_pkthdr.pf.flags = 0;
m->m_pkthdr.pf.routed = 0;
}
- splx(s);
return (m);
}