]> git.ipfire.org Git - thirdparty/linux.git/commit
neighbour: Use RCU list helpers for neigh_parms.list writers.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 22 Oct 2025 05:39:45 +0000 (05:39 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 25 Oct 2025 00:57:20 +0000 (17:57 -0700)
commit06d6322280d95757cef1e3ee0fc62c644629523e
tree240c11cd90f526b206d64b968c0abc6d594b9370
parentf0a24b2547cfdd5ec85a131e386a2ce4ff9179cb
neighbour: Use RCU list helpers for neigh_parms.list writers.

We will convert RTM_GETNEIGHTBL to RCU soon, where we traverse
tbl->parms_list under RCU in neightbl_dump_info().

Let's use RCU list helper for neigh_parms in neigh_parms_alloc()
and neigh_parms_release().

neigh_table_init() uses the plain list_add() for the default
neigh_parm that is embedded in the table and not yet published.

Note that neigh_parms_release() already uses call_rcu() to free
neigh_parms.

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