Skip to content

Commit 3f10e59

Browse files
Jonathan T. LooneyJonathan T. Looney
authored andcommitted
ip6: Add explicit lock order information to catch LOR
Over the past several years, we have had sporadic reports of a lock order reversal between the tcphash lock and the in6_ifaddr_lock. These seems to be hard to reproduce reliably, and the WITNESS backtrace points to code which uses the correct locking order. This commit adds the correct lock order explicitly to help us detect the call stack which uses the incorrect locking order. PR: 289184 Reported by: bz, gbe Reviewed by: bz, glebius Differential Revision: https://reviews.freebsd.org/D54088
1 parent 6f4debc commit 3f10e59

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sys/kern/subr_witness.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,12 @@ static struct witness_order_list_entry order_lists[] = {
566566
{ "tcp", &lock_class_mtx_sleep },
567567
{ "so_snd", &lock_class_mtx_sleep },
568568
{ NULL, NULL },
569+
/*
570+
* IPv6 Addr
571+
*/
572+
{ "tcphash", &lock_class_mtx_sleep },
573+
{ "in6_ifaddr_lock", &lock_class_rm },
574+
{ NULL, NULL },
569575
/*
570576
* BPF
571577
*/

0 commit comments

Comments
 (0)