diff options
author | Eric Dumazet <edumazet@google.com> | 2024-04-21 18:57:53 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-04-23 19:04:50 -0700 |
commit | 1c04b46cbdddc7882eeb671521035ea884245b9f (patch) | |
tree | c03158f6b37510e28670d38d60a5e1188efc76f3 | |
parent | 8d03c1534d4ae136fd2c9e27f026157cb244b212 (diff) |
neighbour: fix neigh_master_filtered()
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>
Link: https://lore.kernel.org/r/20240421185753.1808077-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/core/neighbour.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 0805c00c63d4..af270c202d9a 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". |