]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipmr: Convert ipmr_rtm_dumplink() to RCU.
authorKuniyuki Iwashima <kuniyu@google.com>
Sat, 28 Feb 2026 22:17:21 +0000 (22:17 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2026 02:49:39 +0000 (18:49 -0800)
commit402a8111d7becb4220a94f5684edfbd5d4668ddb
tree6370ff65a980048f0b008f64de65e5299b27a580
parent261950e0390b70f1f17947423a36b8d9baae80f2
ipmr: Convert ipmr_rtm_dumplink() to RCU.

net->ipv4.mr_tables is updated under RTNL and can be read
safely under RCU.

Once created, the multicast route tables are not removed
until netns dismantle.

ipmr_rtm_dumplink() does not need RTNL protection for
ipmr_for_each_table() and ipmr_fill_table() if RCU is held.

Even if mrt->maxvif changes concurrently, ipmr_fill_vif()
returns true to continue dumping the next table.

Let's convert it to RCU.

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