diff options
| author | 2025-10-22 05:39:49 +0000 | |
|---|---|---|
| committer | 2025-10-24 17:57:20 -0700 | |
| commit | 3064d0fe02af23a3956d2b690461abb44da88cf4 (patch) | |
| tree | 80154b9872342952bfe0f5c46c7b2972566355f0 /net/ipv4/arp.c | |
| parent | neighbour: Convert RTM_SETNEIGHTBL to RCU. (diff) | |
| download | wireguard-linux-3064d0fe02af23a3956d2b690461abb44da88cf4.tar.xz wireguard-linux-3064d0fe02af23a3956d2b690461abb44da88cf4.zip | |
neighbour: Convert rwlock of struct neigh_table to spinlock.
Only neigh_for_each() and neigh_seq_start/stop() are on the
reader side of neigh_table.lock.
Let's convert rwlock to the plain spinlock.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251022054004.2514876-6-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/arp.c')
| -rw-r--r-- | net/ipv4/arp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 833f2cf97178..f3bfecf8a234 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -1217,10 +1217,10 @@ int arp_invalidate(struct net_device *dev, __be32 ip, bool force) err = neigh_update(neigh, NULL, NUD_FAILED, NEIGH_UPDATE_F_OVERRIDE| NEIGH_UPDATE_F_ADMIN, 0); - write_lock_bh(&tbl->lock); + spin_lock_bh(&tbl->lock); neigh_release(neigh); neigh_remove_one(neigh); - write_unlock_bh(&tbl->lock); + spin_unlock_bh(&tbl->lock); } return err; |
