diff mbox series

[net-next] neighbour: fix neigh_master_filtered()

Message ID 20240421185753.1808077-1-edumazet@google.com (mailing list archive)
State Accepted
Commit 1c04b46cbdddc7882eeb671521035ea884245b9f
Delegated to: Netdev Maintainers
Headers show
Series [net-next] neighbour: fix neigh_master_filtered() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 930 this patch: 930
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 938 this patch: 938
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 941 this patch: 941
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-24--00-00 (tests: 994)

Commit Message

Eric Dumazet April 21, 2024, 6:57 p.m. UTC
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(-)

Comments

Jiri Pirko April 23, 2024, 1:47 p.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org April 24, 2024, 2:20 a.m. UTC | #2
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!
diff mbox series

Patch

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".