netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 00/15] ipv6: Drop RTNL from mcast.c and anycast.c
@ 2025-07-02 23:01 Kuniyuki Iwashima
  2025-07-02 23:01 ` [PATCH v3 net-next 01/15] ipv6: ndisc: Remove __in6_dev_get() in pndisc_{constructor,destructor}() Kuniyuki Iwashima
                   ` (15 more replies)
  0 siblings, 16 replies; 20+ messages in thread
From: Kuniyuki Iwashima @ 2025-07-02 23:01 UTC (permalink / raw)
  To: David S. Miller, David Ahern, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Simon Horman, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

From: Kuniyuki Iwashima <kuniyu@google.com>

This is a prep series for RCU conversion of RTM_NEWNEIGH, which needs
RTNL during neigh_table.{pconstructor,pdestructor}() touching IPv6
multicast code.

Currently, IPv6 multicast code is protected by lock_sock() and
inet6_dev->mc_lock, and RTNL is not actually needed.

In addition, anycast code is also in the same situation and does not
need RTNL at all.

This series removes RTNL from net/ipv6/{mcast.c,anycast.c} and finally
removes setsockopt_needs_rtnl() from do_ipv6_setsockopt().


Changes:
  v3:
    * Add Eric's tag for Patch 2 ~ 15
    * Patch 1: Return the retval of ipv6_dev_mc_inc()
    * Patch 6, 9, 14: Use dst_dev() for rt->dst.dev
    * Patch 13: Use READ_ONCE() for net->ipv6.devconf_all->forwarding
      and idev->conf.forwarding

  v2: https://lore.kernel.org/netdev/20250624202616.526600-1-kuni1840@gmail.com/
    * Patch 2: Clarify which function doesn't need assertion
    * Patch 6, 9, 14: Call rt6_lookup() and dev_hold() under RCU

  v1: https://lore.kernel.org/netdev/20250616233417.1153427-1-kuni1840@gmail.com/


Kuniyuki Iwashima (15):
  ipv6: ndisc: Remove __in6_dev_get() in
    pndisc_{constructor,destructor}().
  ipv6: mcast: Replace locking comments with lockdep annotations.
  ipv6: mcast: Check inet6_dev->dead under idev->mc_lock in
    __ipv6_dev_mc_inc().
  ipv6: mcast: Remove mca_get().
  ipv6: mcast: Use in6_dev_get() in ipv6_dev_mc_dec().
  ipv6: mcast: Don't hold RTNL for IPV6_ADD_MEMBERSHIP and
    MCAST_JOIN_GROUP.
  ipv6: mcast: Don't hold RTNL for IPV6_DROP_MEMBERSHIP and
    MCAST_LEAVE_GROUP.
  ipv6: mcast: Don't hold RTNL in ipv6_sock_mc_close().
  ipv6: mcast: Don't hold RTNL for MCAST_ socket options.
  ipv6: mcast: Remove unnecessary ASSERT_RTNL and comment.
  ipv6: anycast: Don't use rtnl_dereference().
  ipv6: anycast: Don't hold RTNL for IPV6_LEAVE_ANYCAST and
    IPV6_ADDRFORM.
  ipv6: anycast: Unify two error paths in ipv6_sock_ac_join().
  ipv6: anycast: Don't hold RTNL for IPV6_JOIN_ANYCAST.
  ipv6: Remove setsockopt_needs_rtnl().

 include/linux/netdevice.h |   4 +-
 net/core/dev.c            |  38 +++--
 net/ipv6/addrconf.c       |  12 +-
 net/ipv6/anycast.c        | 100 +++++++-----
 net/ipv6/ipv6_sockglue.c  |  28 +---
 net/ipv6/mcast.c          | 332 +++++++++++++++++++-------------------
 net/ipv6/ndisc.c          |  13 +-
 7 files changed, 260 insertions(+), 267 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-07-09  1:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 23:01 [PATCH v3 net-next 00/15] ipv6: Drop RTNL from mcast.c and anycast.c Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 01/15] ipv6: ndisc: Remove __in6_dev_get() in pndisc_{constructor,destructor}() Kuniyuki Iwashima
2025-07-03  7:25   ` Eric Dumazet
2025-07-02 23:01 ` [PATCH v3 net-next 02/15] ipv6: mcast: Replace locking comments with lockdep annotations Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 03/15] ipv6: mcast: Check inet6_dev->dead under idev->mc_lock in __ipv6_dev_mc_inc() Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 04/15] ipv6: mcast: Remove mca_get() Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 05/15] ipv6: mcast: Use in6_dev_get() in ipv6_dev_mc_dec() Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 06/15] ipv6: mcast: Don't hold RTNL for IPV6_ADD_MEMBERSHIP and MCAST_JOIN_GROUP Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 07/15] ipv6: mcast: Don't hold RTNL for IPV6_DROP_MEMBERSHIP and MCAST_LEAVE_GROUP Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 08/15] ipv6: mcast: Don't hold RTNL in ipv6_sock_mc_close() Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 09/15] ipv6: mcast: Don't hold RTNL for MCAST_ socket options Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 10/15] ipv6: mcast: Remove unnecessary ASSERT_RTNL and comment Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 11/15] ipv6: anycast: Don't use rtnl_dereference() Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 12/15] ipv6: anycast: Don't hold RTNL for IPV6_LEAVE_ANYCAST and IPV6_ADDRFORM Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 13/15] ipv6: anycast: Unify two error paths in ipv6_sock_ac_join() Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 14/15] ipv6: anycast: Don't hold RTNL for IPV6_JOIN_ANYCAST Kuniyuki Iwashima
2025-07-09  1:40   ` Jakub Kicinski
2025-07-09  1:52     ` Kuniyuki Iwashima
2025-07-02 23:01 ` [PATCH v3 net-next 15/15] ipv6: Remove setsockopt_needs_rtnl() Kuniyuki Iwashima
2025-07-09  1:50 ` [PATCH v3 net-next 00/15] ipv6: Drop RTNL from mcast.c and anycast.c patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).