Message ID | 20210621144417.694367-1-eric.dumazet@gmail.com |
---|---|
State | New |
Headers | show |
Series | [net] vxlan: add missing rcu_read_lock() in neigh_reduce() | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 21 Jun 2021 07:44:17 -0700 you wrote: > From: Eric Dumazet <edumazet@google.com> > > syzbot complained in neigh_reduce(), because rcu_read_lock_bh() > is treated differently than rcu_read_lock() > > WARNING: suspicious RCU usage > 5.13.0-rc6-syzkaller #0 Not tainted > > [...] Here is the summary with links: - [net] vxlan: add missing rcu_read_lock() in neigh_reduce() https://git.kernel.org/netdev/net/c/85e8b032d6eb You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 02a14f1b938ad50fc28044b7670ba5f6bf924345..5a8df5a195cb5700c45b4785355ef8ed84866052 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2164,6 +2164,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni) struct neighbour *n; struct nd_msg *msg; + rcu_read_lock(); in6_dev = __in6_dev_get(dev); if (!in6_dev) goto out; @@ -2215,6 +2216,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni) } out: + rcu_read_unlock(); consume_skb(skb); return NETDEV_TX_OK; }