]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: resolve a false alarm of lockdep
authorWANG Cong <xiyou.wangcong@gmail.com>
Thu, 16 Mar 2017 17:32:42 +0000 (10:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2017 04:29:20 +0000 (21:29 -0700)
commit44e3546b43997249c2297288ff3186ef449f7e59
treef2e7a8d5f346f39bc220147fcfc5b3a70c9f8999
parentcb50d30d8bee6e3a1df667220aa7e3c283a008a9
bridge: resolve a false alarm of lockdep

Andrei reported a false alarm of lockdep at net/bridge/br_fdb.c:109,
this is because in Andrei's case, a spin_bug() was already triggered
before this, therefore the debug_locks is turned off, lockdep_is_held()
is no longer accurate after that. We should use lockdep_assert_held_once()
instead of lockdep_is_held() to respect debug_locks.

Fixes: e5c10e1e45503 ("bridge: fdb: add proper lock checks in searching functions")
Reported-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c
net/bridge/br_private.h