aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@google.com>2025-07-16 22:08:17 +0000
committerJakub Kicinski <kuba@kernel.org>2025-07-17 16:25:21 -0700
commitdd103c9a53752d3754a3182ec8dd97885680cfe2 (patch)
treea7c72c07baf447fdb412409f2673b0425f082aaf /include/net
parentneighbour: Use rcu_dereference() in pneigh_get_{first,next}(). (diff)
downloadlinux-dd103c9a53752d3754a3182ec8dd97885680cfe2.tar.gz
linux-dd103c9a53752d3754a3182ec8dd97885680cfe2.zip
neighbour: Remove __pneigh_lookup().
__pneigh_lookup() is the lockless version of pneigh_lookup(), but its only caller pndisc_is_router() holds the table lock and reads pneigh_netry.flags. This is because accessing pneigh_entry after pneigh_lookup() was illegal unless the caller holds RTNL or the table lock. Now, pneigh_entry is guaranteed to be alive during the RCU critical section. Let's call pneigh_lookup() and use READ_ONCE() for n->flags in pndisc_is_router() and remove __pneigh_lookup(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250716221221.442239-13-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/neighbour.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 6d7f9aa53a7a..f8c7261cd4eb 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -381,8 +381,6 @@ void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
struct sk_buff *skb);
struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net,
const void *key, struct net_device *dev);
-struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, struct net *net,
- const void *key, struct net_device *dev);
struct pneigh_entry *pneigh_create(struct neigh_table *tbl, struct net *net,
const void *key, struct net_device *dev);
int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key,