public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
@ 2026-01-30 19:19 Eric Dumazet
  2026-01-30 19:43 ` David Ahern
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Dumazet @ 2026-01-30 19:19 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, David Ahern, Kuniyuki Iwashima, netdev,
	eric.dumazet, 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 <edumazet@google.com>
---
 include/net/l3mdev.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h
index 1eb8dad18f7e35baf26db23b44e182540395bba0..710e98665eb36d6154b914bee27a767ecf4f6fac 100644
--- a/include/net/l3mdev.h
+++ b/include/net/l3mdev.h
@@ -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;
 }
-- 
2.53.0.rc1.225.gd81095ad13-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
  2026-01-30 19:19 [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out() Eric Dumazet
@ 2026-01-30 19:43 ` David Ahern
  2026-01-31  6:19 ` Kuniyuki Iwashima
  2026-02-03  1:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: David Ahern @ 2026-01-30 19:43 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Kuniyuki Iwashima, netdev, eric.dumazet

On 1/30/26 12:19 PM, Eric Dumazet wrote:
> Extend the RCU section a bit so that we can use the safer
> skb_dst_dev_rcu() helper.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  include/net/l3mdev.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
  2026-01-30 19:19 [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out() Eric Dumazet
  2026-01-30 19:43 ` David Ahern
@ 2026-01-31  6:19 ` Kuniyuki Iwashima
  2026-02-03  1:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Kuniyuki Iwashima @ 2026-01-31  6:19 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
	David Ahern, netdev, eric.dumazet

On Fri, Jan 30, 2026 at 11:19 AM Eric Dumazet <edumazet@google.com> wrote:
>
> Extend the RCU section a bit so that we can use the safer
> skb_dst_dev_rcu() helper.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out()
  2026-01-30 19:19 [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out() Eric Dumazet
  2026-01-30 19:43 ` David Ahern
  2026-01-31  6:19 ` Kuniyuki Iwashima
@ 2026-02-03  1:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-03  1:20 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: davem, kuba, pabeni, horms, dsahern, kuniyu, netdev, eric.dumazet

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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 <edumazet@google.com>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-03  1:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30 19:19 [PATCH net-next] net: l3mdev: use skb_dst_dev_rcu() in l3mdev_l3_out() Eric Dumazet
2026-01-30 19:43 ` David Ahern
2026-01-31  6:19 ` Kuniyuki Iwashima
2026-02-03  1:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox