mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c
[ Upstream commit 95f59bf88bb75281cc626e283ecefdd5d5641427 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
dfe417b456
commit
b66de2d961
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue