]> git.ipfire.org Git - thirdparty/linux.git/commit
neighbour: Use rcu_dereference() in pneigh_get_{first,next}().
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 16 Jul 2025 22:08:16 +0000 (22:08 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Jul 2025 23:25:21 +0000 (16:25 -0700)
commitb9c89fa128fa41e56300434dfca1138459b29384
treebd5b6056c01ffe8d7be8ebd2b7c8106029f49e29
parent32d5eaabf186112eb2023aacb860c47ff7e7fdbf
neighbour: Use rcu_dereference() in pneigh_get_{first,next}().

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

Let's use rcu_dereference() in pneigh_get_{first,next}().

Note that neigh_seq_start() still holds tbl->lock for the
normal neighbour entry.

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