public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] neighbour: fix neigh_master_filtered()
@ 2024-04-21 18:57 Eric Dumazet
  2024-04-23 13:47 ` Jiri Pirko
  2024-04-24  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-04-21 18:57 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, eric.dumazet, Eric Dumazet

If we no longer hold RTNL, we must use netdev_master_upper_dev_get_rcu()
instead of netdev_master_upper_dev_get().

Fixes: ba0f78069423 ("neighbour: no longer hold RTNL in neigh_dump_info()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 0805c00c63d434589aeedaf8c40781b822d70b08..af270c202d9a96f64a409cb7f37f1d4620d948f8 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2682,7 +2682,7 @@ static bool neigh_master_filtered(struct net_device *dev, int master_idx)
 	if (!master_idx)
 		return false;
 
-	master = dev ? netdev_master_upper_dev_get(dev) : NULL;
+	master = dev ? netdev_master_upper_dev_get_rcu(dev) : NULL;
 
 	/* 0 is already used to denote NDA_MASTER wasn't passed, therefore need another
 	 * invalid value for ifindex to denote "no master".
-- 
2.44.0.769.g3c40516874-goog


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

* Re: [PATCH net-next] neighbour: fix neigh_master_filtered()
  2024-04-21 18:57 [PATCH net-next] neighbour: fix neigh_master_filtered() Eric Dumazet
@ 2024-04-23 13:47 ` Jiri Pirko
  2024-04-24  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2024-04-23 13:47 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, netdev,
	eric.dumazet

Sun, Apr 21, 2024 at 08:57:53PM CEST, edumazet@google.com wrote:
>If we no longer hold RTNL, we must use netdev_master_upper_dev_get_rcu()
>instead of netdev_master_upper_dev_get().
>
>Fixes: ba0f78069423 ("neighbour: no longer hold RTNL in neigh_dump_info()")
>Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

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

* Re: [PATCH net-next] neighbour: fix neigh_master_filtered()
  2024-04-21 18:57 [PATCH net-next] neighbour: fix neigh_master_filtered() Eric Dumazet
  2024-04-23 13:47 ` Jiri Pirko
@ 2024-04-24  2:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-24  2:20 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, kuba, pabeni, netdev, eric.dumazet

Hello:

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

On Sun, 21 Apr 2024 18:57:53 +0000 you wrote:
> If we no longer hold RTNL, we must use netdev_master_upper_dev_get_rcu()
> instead of netdev_master_upper_dev_get().
> 
> Fixes: ba0f78069423 ("neighbour: no longer hold RTNL in neigh_dump_info()")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/core/neighbour.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] neighbour: fix neigh_master_filtered()
    https://git.kernel.org/netdev/net-next/c/1c04b46cbddd

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] 3+ messages in thread

end of thread, other threads:[~2024-04-24  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-21 18:57 [PATCH net-next] neighbour: fix neigh_master_filtered() Eric Dumazet
2024-04-23 13:47 ` Jiri Pirko
2024-04-24  2: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