]> Gentwo Git Trees - linux/.git/commit
neighbour: Convert RTM_GETNEIGHTBL to RCU.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 22 Oct 2025 05:39:47 +0000 (05:39 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 25 Oct 2025 00:57:20 +0000 (17:57 -0700)
commit4ae34be500649ec452ac1fc2748958683ad9b55d
treedeeaa864994ed931a47533273036a6213eceb0bc
parent35d7c70870338aa6a367b9e4ed528914320b0be0
neighbour: Convert RTM_GETNEIGHTBL to RCU.

neightbl_dump_info() calls these functions for each neigh_tables[]
entry:

  1. neightbl_fill_info() for tbl->parms
  2. neightbl_fill_param_info() for tbl->parms_list (except tbl->parms)

Both functions rely on the table lock (read_lock_bh(&tbl->lock))
and RTNL is not needed.

Let's fetch the table under RCU and convert RTM_GETNEIGHTBL to RCU.

Note that the first entry of tbl->parms_list is tbl->parms.list and
embedded in neigh_table, so list_next_entry() is safe.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251022054004.2514876-4-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/neighbour.c