diff options
author | Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com> | 2020-05-14 16:11:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-15 02:43:45 +0200 |
commit | 95f59bf88bb75281cc626e283ecefdd5d5641427 (patch) | |
tree | 84e4c587ea545b36a522034980a918ea913072b4 /drivers/net/hamradio/bpqether.c | |
parent | net: phy: broadcom: fix BCM54XX_SHD_SCR3_TRDDAPD value for BCM54810 (diff) | |
download | linux-95f59bf88bb75281cc626e283ecefdd5d5641427.tar.xz linux-95f59bf88bb75281cc626e283ecefdd5d5641427.zip |
drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c
This patch fixes the following warning:
=============================
WARNING: suspicious RCU usage
5.7.0-rc5-next-20200514-syzkaller #0 Not tainted
-----------------------------
drivers/net/hamradio/bpqether.c:149 RCU-list traversed in non-reader section!!
Since rtnl lock is held, pass this cond in list_for_each_entry_rcu().
Reported-by: syzbot+bb82cafc737c002d11ca@syzkaller.appspotmail.com
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio/bpqether.c')
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index fbea6f232819..e2ad3c2e8df5 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -127,7 +127,8 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev) { struct bpqdev *bpq; - list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list) { + list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list, + lockdep_rtnl_is_held()) { if (bpq->ethdev == dev) return bpq->axdev; } |