]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipmr: Add dedicated mutex for mrt->{mfc_hash,mfc_cache_list}.
authorKuniyuki Iwashima <kuniyu@google.com>
Sat, 28 Feb 2026 22:17:32 +0000 (22:17 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2026 02:49:41 +0000 (18:49 -0800)
commit3c1e53e55418d4ca4040e281501643a96e227974
tree6f4ad1ef3380cdcbb12105ef85ddedb09e8ebf19
parent4480d5fa1f6ebe7dfc546e14371d63c8b915a82d
ipmr: Add dedicated mutex for mrt->{mfc_hash,mfc_cache_list}.

We will no longer hold RTNL for ipmr_rtm_route() to modify the
MFC hash table.

Only __dev_get_by_index() in rtm_to_ipmr_mfcc() is the RTNL
dependant, otherwise, we just need protection for mrt->mfc_hash
and mrt->mfc_cache_list.

Let's add a new mutex for ipmr_mfc_add(), ipmr_mfc_delete(),
and mroute_clean_tables() (setsockopt(MRT_FLUSH or MRT_DONE)).

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