summaryrefslogtreecommitdiff
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-21 04:01:14 +0000
committerJakub Kicinski <kuba@kernel.org>2023-03-21 21:32:18 -0700
commit09eed1192cec1755967f2af8394207acdde579a1 (patch)
tree56d5468faacd013422de043a3263016b34b300a6 /include/net/neighbour.h
parent4c5c496a942fa3d2197f5be22762695170c95863 (diff)
neighbour: switch to standard rcu, instead of rcu_bh
rcu_bh is no longer a win, especially for objects freed with standard call_rcu(). Switch neighbour code to no longer disable BH when not necessary. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r--include/net/neighbour.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index c8d39bba2a0d..3fa5774bddac 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -299,14 +299,14 @@ static inline struct neighbour *___neigh_lookup_noref(
const void *pkey,
struct net_device *dev)
{
- struct neigh_hash_table *nht = rcu_dereference_bh(tbl->nht);
+ struct neigh_hash_table *nht = rcu_dereference(tbl->nht);
struct neighbour *n;
u32 hash_val;
hash_val = hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
- for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]);
+ for (n = rcu_dereference(nht->hash_buckets[hash_val]);
n != NULL;
- n = rcu_dereference_bh(n->next)) {
+ n = rcu_dereference(n->next)) {
if (n->dev == dev && key_eq(n, pkey))
return n;
}