net: let lockdep compare instance locks
authorJakub Kicinski <kuba@kernel.org>
Sat, 17 May 2025 20:08:10 +0000 (13:08 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 May 2025 01:14:33 +0000 (18:14 -0700)
commit4c2bd7913f52b1e5c978edf56cdef39c30a1f603
tree7864b70108ffdb7a14df74db287aab1962fc2a31
parent6a7e8b5d632834f2722cdabf81bd0b9eef3a214d
net: let lockdep compare instance locks

AFAIU always returning -1 from lockdep's compare function
basically disables checking of dependencies between given
locks. Try to be a little more precise about what guarantees
that instance locks won't deadlock.

Right now we only nest them under protection of rtnl_lock.
Mostly in unregister_netdevice_many() and dev_close_many().

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250517200810.466531-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netdev_lock.h