mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
geneve: lock RCU on TX path
There is no guarantees that callers of the TX path will hold
the RCU lock. Grab it explicitly.
Fixes: fceb9c3e38
("geneve: avoid using stale geneve socket.")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
56de859e99
commit
a717e3f740
@ -881,12 +881,14 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
info = &geneve->info;
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (info->mode & IP_TUNNEL_INFO_IPV6)
|
||||
err = geneve6_xmit_skb(skb, dev, geneve, info);
|
||||
else
|
||||
#endif
|
||||
err = geneve_xmit_skb(skb, dev, geneve, info);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (likely(!err))
|
||||
return NETDEV_TX_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user