aboutsummaryrefslogtreecommitdiff
path: root/sys/netipx/ipx_input.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2005-01-09 05:08:47 +0000
committerRobert Watson <rwatson@FreeBSD.org>2005-01-09 05:08:47 +0000
commit31f1a840d99b55ce3e7e98a663b8146eabf278a6 (patch)
tree3a2c8367b4ef3071f348edda3aad8cdc34a6f7de /sys/netipx/ipx_input.c
parent992e1a5842d07f3293d1a1b4a40ef8c79a61f5f9 (diff)
downloadsrc-31f1a840d99b55ce3e7e98a663b8146eabf278a6.tar.gz
src-31f1a840d99b55ce3e7e98a663b8146eabf278a6.zip
Hold the IPX PCB mutex around calls to ipx_input() in the IPX input
path. MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=139927
Diffstat (limited to 'sys/netipx/ipx_input.c')
-rw-r--r--sys/netipx/ipx_input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c
index 92d4e3899c0b..d0d01a4208be 100644
--- a/sys/netipx/ipx_input.c
+++ b/sys/netipx/ipx_input.c
@@ -165,8 +165,11 @@ ipxintr(struct mbuf *m)
IPX_LIST_LOCK();
LIST_FOREACH(ipxp, &ipxrawpcb_list, ipxp_list) {
struct mbuf *m1 = m_copy(m, 0, (int)M_COPYALL);
- if (m1 != NULL)
+ if (m1 != NULL) {
+ IPX_LOCK(ipxp);
ipx_input(m1, ipxp);
+ IPX_UNLOCK(ipxp);
+ }
}
IPX_LIST_UNLOCK();
@@ -278,7 +281,9 @@ ours:
IPX_LIST_UNLOCK();
return;
}
+ IPX_LOCK(ipxp);
ipx_input(m, ipxp);
+ IPX_UNLOCK(ipxp);
} else
m_freem(m);
IPX_LIST_UNLOCK();
@@ -507,7 +512,9 @@ struct ifnet *ifp;
}
}
ipx->ipx_len = ntohl(m0->m_pkthdr.len);
+ IPX_LOCK(ipxp);
ipx_input(m0, ipxp);
+ IPX_UNLOCK(ipxp);
}
}
IPX_LIST_UNLOCK();