From 292410a6b8e787b12658c7d87f2bbaeeb273723a Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 15 Jun 2004 04:13:59 +0000 Subject: Lock down rawcb_list, a global list of control blocks for raw sockets, using rawcb_mtx. Hold this mutex while modifying or iterating over the control list; this means that the mutex is held over calls into socket delivery code, which no longer causes a lock order reversal as the routing socket code uses a netisr to avoid recursing socket -> routing -> socket. Note: Locking of IPsec consumers of rawcb_list is not included in this commit. --- sys/net/raw_cb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/net/raw_cb.h') diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h index 22b100b..177dedf 100644 --- a/sys/net/raw_cb.h +++ b/sys/net/raw_cb.h @@ -57,6 +57,7 @@ struct rawcb { #ifdef _KERNEL extern LIST_HEAD(rawcb_list_head, rawcb) rawcb_list; +extern struct mtx rawcb_mtx; /* protosw entries */ pr_ctlinput_t raw_ctlinput; -- cgit v1.1