diff options
| author | Eric Dumazet <edumazet@google.com> | 2023-03-21 04:01:14 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-10 22:00:42 +0200 |
| commit | 2b76aad68b308b7ab50fe075a32b16195fb12f1c (patch) | |
| tree | 0a4d95cabebfff94c908eebaf6b23bed9b61404a /include/net/arp.h | |
| parent | 0526933c10058c69a5a85faaa3825116e68fd465 (diff) | |
| download | linux-2b76aad68b308b7ab50fe075a32b16195fb12f1c.tar.gz linux-2b76aad68b308b7ab50fe075a32b16195fb12f1c.tar.bz2 linux-2b76aad68b308b7ab50fe075a32b16195fb12f1c.zip | |
neighbour: switch to standard rcu, instead of rcu_bh
[ Upstream commit 09eed1192cec1755967f2af8394207acdde579a1 ]
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>
Stable-dep-of: 5baa0433a15e ("neighbour: fix data-races around n->output")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/arp.h')
| -rw-r--r-- | include/net/arp.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net/arp.h b/include/net/arp.h index d7ef4ec71dfe..e8747e0713c7 100644 --- a/include/net/arp.h +++ b/include/net/arp.h @@ -38,11 +38,11 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32 { struct neighbour *n; - rcu_read_lock_bh(); + rcu_read_lock(); n = __ipv4_neigh_lookup_noref(dev, key); if (n && !refcount_inc_not_zero(&n->refcnt)) n = NULL; - rcu_read_unlock_bh(); + rcu_read_unlock(); return n; } @@ -51,10 +51,10 @@ static inline void __ipv4_confirm_neigh(struct net_device *dev, u32 key) { struct neighbour *n; - rcu_read_lock_bh(); + rcu_read_lock(); n = __ipv4_neigh_lookup_noref(dev, key); neigh_confirm(n); - rcu_read_unlock_bh(); + rcu_read_unlock(); } void arp_init(void); |
