diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-03-03 05:49:43 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-03-03 05:49:43 +0300 |
| commit | cd994652225f8758cb1e5c9dd879320dcf7ce4e5 (patch) | |
| tree | 277923ee9b620b511a000d8b5ad27f5296edc5b0 /include/linux | |
| parent | a0e8c9a5060fbdb72fca767164467a3cf2b8fc30 (diff) | |
| parent | bddafc06ca5ee1be4d10061f7954c6d6be5dc1d8 (diff) | |
| download | linux-cd994652225f8758cb1e5c9dd879320dcf7ce4e5.tar.xz | |
Merge branch 'ipmr-no-rtnl-for-rtnl_family_ipmr-rtnetlink'
Kuniyuki Iwashima says:
====================
ipmr: No RTNL for RTNL_FAMILY_IPMR rtnetlink.
This series removes RTNL from ipmr rtnetlink handlers.
After this series, there are a few RTNL left in net/ipv4/ipmr.c
and such users will be converted to per-netns RTNL in another
series.
Patch 1 adds a selftest to exercise most? of the RTNL paths
in net/ipv4/ipmr.c
Patch 2 - 6 converts RTM_GETLINK / RTM_GETROUTE handlers
to RCU.
Patch 7 - 9 converts ->exit_batch() to ->exit_rtnl() to
save one RTNL in cleanup_net().
Patch 10 - 11 removes unnecessary RTNL during setup_net()
failure.
Patch 12 is a random cleanup.
Patch 13 - 15 drops RTNL for RTM_NEWROUTE and RTM_DELROUTE.
====================
Link: https://patch.msgid.link/20260228221800.1082070-1-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mroute_base.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/mroute_base.h b/include/linux/mroute_base.h index 0075f6e5c3da..cf3374580f74 100644 --- a/include/linux/mroute_base.h +++ b/include/linux/mroute_base.h @@ -76,7 +76,7 @@ static inline int mr_call_vif_notifiers(struct net *net, struct vif_device *vif, struct net_device *vif_dev, unsigned short vif_index, u32 tb_id, - unsigned int *ipmr_seq) + atomic_t *ipmr_seq) { struct vif_entry_notifier_info info = { .info = { @@ -89,7 +89,7 @@ static inline int mr_call_vif_notifiers(struct net *net, }; ASSERT_RTNL(); - (*ipmr_seq)++; + atomic_inc(ipmr_seq); return call_fib_notifiers(net, event_type, &info.info); } @@ -198,7 +198,7 @@ static inline int mr_call_mfc_notifiers(struct net *net, unsigned short family, enum fib_event_type event_type, struct mr_mfc *mfc, u32 tb_id, - unsigned int *ipmr_seq) + atomic_t *ipmr_seq) { struct mfc_entry_notifier_info info = { .info = { @@ -208,8 +208,7 @@ static inline int mr_call_mfc_notifiers(struct net *net, .tb_id = tb_id }; - ASSERT_RTNL(); - (*ipmr_seq)++; + atomic_inc(ipmr_seq); return call_fib_notifiers(net, event_type, &info.info); } |
