diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-01-24 22:56:09 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-01-24 22:56:09 +0000 |
commit | c07ace7f7b4ed5767d3d6eb6fbc56ed010a292e1 (patch) | |
tree | 8f3197f3f77b0c1d3325ea0d91c23fe92b92fe82 /sys/net/raw_cb.c | |
parent | cfdb85a2f9ab7f790dc7847103413f1428dbc9fd (diff) | |
download | FreeBSD-src-c07ace7f7b4ed5767d3d6eb6fbc56ed010a292e1.zip FreeBSD-src-c07ace7f7b4ed5767d3d6eb6fbc56ed010a292e1.tar.gz |
Acquire the raw_cb mutex around LIST_REMOVE() of a raw socket control
block from the global raw socket list.
Submitted by: Roselyn Lee <rosel at verniernetworks dot com>
MFC after: 1 week
Diffstat (limited to 'sys/net/raw_cb.c')
-rw-r--r-- | sys/net/raw_cb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/raw_cb.c b/sys/net/raw_cb.c index 8a8bba6..31566d1 100644 --- a/sys/net/raw_cb.c +++ b/sys/net/raw_cb.c @@ -102,7 +102,9 @@ raw_detach(rp) SOCK_LOCK(so); so->so_pcb = 0; sotryfree(so); + mtx_lock(&rawcb_mtx); LIST_REMOVE(rp, list); + mtx_unlock(&rawcb_mtx); #ifdef notdef if (rp->rcb_laddr) m_freem(dtom(rp->rcb_laddr)); |