net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
Subsystems (3)
PATCH 1/1 net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
Extend the RCU section a bit so that we can use the safer skb_dst_dev_rcu() helper.
Signed-off-by Eric Dumazet <[email protected]>
--- include/net/l3mdev.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
include/net/l3mdev.h +4 -3
@@ -207,18 +207,19 @@ struct sk_buff *l3mdev_ip6_rcv(struct sk_buff *skb)static inline struct sk_buff *l3mdev_l3_out (struct sock *sk,struct sk_buff *skb,u16 proto) { -struct net_device *dev =skb_dst (skb)->dev; +struct net_device *dev; +rcu_read_lock (); + dev =skb_dst_dev_rcu (skb);if (netif_is_l3_slave (dev)) {struct net_device *master; -rcu_read_lock (); master =netdev_master_upper_dev_get_rcu (dev);if (master && master->l3mdev_ops->l3mdev_l3_out) skb = master->l3mdev_ops->l3mdev_l3_out (master, sk, skb, proto); -rcu_read_unlock (); } +rcu_read_unlock ();return skb; }
Signature · 1 line
2.53.0.rc1.225.gd81095ad13-goog
Quoted 8 lines · Eric Dumazet
Extend the RCU section a bit so that we can use the safer
skb_dst_dev_rcu()helper.Signed-off-by Eric Dumazet <[email protected]>--- include/net/l3mdev.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by David Ahern <[email protected]>
Quoted 5 lines · Eric Dumazet
Extend the RCU section a bit so that we can use the safer
skb_dst_dev_rcu()helper.Signed-off-by Eric Dumazet <[email protected]>
Reviewed-by Kuniyuki Iwashima <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Fri, 30 Jan 2026 19:19:06 +0000 you wrote:
Extend the RCU section a bit so that we can use the safer
skb_dst_dev_rcu()helper.Signed-off-by Eric Dumazet <[email protected]>--- include/net/l3mdev.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
https://git.kernel.org/netdev/net-next/c/82f35bec11bd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html