The branch main has been updated by jtl: URL: https://cgit.FreeBSD.org/src/commit/?id=3f10e5985044001a68761995474f1100aca648e1
commit 3f10e5985044001a68761995474f1100aca648e1 Author: Jonathan T. Looney <[email protected]> AuthorDate: 2025-12-05 17:34:31 +0000 Commit: Jonathan T. Looney <[email protected]> CommitDate: 2025-12-06 19:58:46 +0000 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 --- sys/kern/subr_witness.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index c937f6a82757..abed76315c34 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -566,6 +566,12 @@ static struct witness_order_list_entry order_lists[] = { { "tcp", &lock_class_mtx_sleep }, { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, + /* + * IPv6 Addr + */ + { "tcphash", &lock_class_mtx_sleep }, + { "in6_ifaddr_lock", &lock_class_rm }, + { NULL, NULL }, /* * BPF */
