]> git.ipfire.org Git - thirdparty/linux.git/commit
neighbour: Drop read_lock_bh(&tbl->lock) in pneigh_dump_table().
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 16 Jul 2025 22:08:15 +0000 (22:08 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Jul 2025 23:25:21 +0000 (16:25 -0700)
commit32d5eaabf186112eb2023aacb860c47ff7e7fdbf
tree2ee733c4b912188c16070d33831a88cae7f15e79
parented6e380d2d419a3e8ca73de7b4c7ccb522835f1e
neighbour: Drop read_lock_bh(&tbl->lock) in pneigh_dump_table().

Now pneigh_entry is guaranteed to be alive during the
RCU critical section even without holding tbl->lock.

Let's drop read_lock_bh(&tbl->lock) and use rcu_dereference()
to iterate tbl->phash_buckets[] in pneigh_dump_table()

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250716221221.442239-11-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/neighbour.c