diff options
author | Juhee Kang <claudiajkang@gmail.com> | 2022-02-20 18:32:50 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-22 07:43:10 +0300 |
commit | a0b92e0514bb3c5e57c33fd720724a629f67e042 (patch) | |
tree | fae08e62f84df38c62de933e627229b72e3fa056 /scripts/coccicheck | |
parent | 7b779cc8846ae0bfdad8eca7b751109a5cf930b7 (diff) | |
download | linux-a0b92e0514bb3c5e57c33fd720724a629f67e042.tar.xz |
net: hsr: fix hsr build error when lockdep is not enabled
In hsr, lockdep_is_held() is needed for rcu_dereference_bh_check().
But if lockdep is not enabled, lockdep_is_held() causes a build error:
ERROR: modpost: "lockdep_is_held" [net/hsr/hsr.ko] undefined!
Thus, this patch solved by adding lockdep_hsr_is_held(). This helper
function calls the lockdep_is_held() when lockdep is enabled, and returns 1
if not defined.
Fixes: e7f27420681f ("net: hsr: fix suspicious RCU usage warning in hsr_node_get_first()")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
Link: https://lore.kernel.org/r/20220220153250.5285-1-claudiajkang@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/coccicheck')
0 files changed, 0 insertions, 0 deletions