netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/16] net: more factorization in cleanup_net() paths
@ 2024-02-02 17:39 Eric Dumazet
  2024-02-02 17:39 ` [PATCH v2 net-next 01/16] net: add exit_batch_rtnl() method Eric Dumazet
                   ` (15 more replies)
  0 siblings, 16 replies; 20+ messages in thread
From: Eric Dumazet @ 2024-02-02 17:39 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: Antoine Tenart, netdev, eric.dumazet, Eric Dumazet

This series is inspired by recent syzbot reports hinting to RTNL and
workqueue abuses.

rtnl_lock() is unfair to (single threaded) cleanup_net(), because
many threads can cause contention on it.

This series adds a new (struct pernet_operations) method,
so that cleanup_net() can hold RTNL longer once it finally
acquires it.

It also factorizes unregister_netdevice_many(), to further
reduce stalls in cleanup_net().

v2: Antoine Tenart feedback in
      https://lore.kernel.org/netdev/170688415193.5216.10499830272732622816@kwain/
    - Added bond_net_pre_exit() method to make sure bond_destroy_sysfs()
      is called before we unregister the devices in bond_net_exit_batch_rtnl()

Eric Dumazet (16):
  net: add exit_batch_rtnl() method
  nexthop: convert nexthop_net_exit_batch to exit_batch_rtnl method
  net: convert default_device_exit_batch() to exit_batch_rtnl method
  bareudp: use exit_batch_rtnl() method
  bonding: use exit_batch_rtnl() method
  geneve: use exit_batch_rtnl() method
  gtp: use exit_batch_rtnl() method
  ipv4: add __unregister_nexthop_notifier()
  vxlan: use exit_batch_rtnl() method
  ip6_gre: use exit_batch_rtnl() method
  ip6_tunnel: use exit_batch_rtnl() method
  ip6_vti: use exit_batch_rtnl() method
  sit: use exit_batch_rtnl() method
  ip_tunnel: use exit_batch_rtnl() method
  bridge: use exit_batch_rtnl() method
  xfrm: interface: use exit_batch_rtnl() method

 drivers/net/bareudp.c           | 13 ++++-------
 drivers/net/bonding/bond_main.c | 37 ++++++++++++++++++++++----------
 drivers/net/geneve.c            | 13 ++++-------
 drivers/net/gtp.c               | 20 ++++++++---------
 drivers/net/vxlan/vxlan_core.c  | 21 ++++++++++--------
 include/net/ip_tunnels.h        |  3 ++-
 include/net/net_namespace.h     |  3 +++
 include/net/nexthop.h           |  1 +
 net/bridge/br.c                 | 15 +++++--------
 net/core/dev.c                  | 13 +++++------
 net/core/net_namespace.c        | 31 ++++++++++++++++++++++++++-
 net/ipv4/ip_gre.c               | 24 +++++++++++++--------
 net/ipv4/ip_tunnel.c            | 10 ++++-----
 net/ipv4/ip_vti.c               |  8 ++++---
 net/ipv4/ipip.c                 |  8 ++++---
 net/ipv4/nexthop.c              | 38 ++++++++++++++++++++++-----------
 net/ipv6/ip6_gre.c              | 12 +++++------
 net/ipv6/ip6_tunnel.c           | 12 +++++------
 net/ipv6/ip6_vti.c              | 12 +++++------
 net/ipv6/sit.c                  | 13 +++++------
 net/xfrm/xfrm_interface_core.c  | 14 ++++++------
 21 files changed, 182 insertions(+), 139 deletions(-)

-- 
2.43.0.594.gd9cf4e227d-goog


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

end of thread, other threads:[~2024-02-04 10:15 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 17:39 [PATCH v2 net-next 00/16] net: more factorization in cleanup_net() paths Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 01/16] net: add exit_batch_rtnl() method Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 02/16] nexthop: convert nexthop_net_exit_batch to exit_batch_rtnl method Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 03/16] net: convert default_device_exit_batch() " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 04/16] bareudp: use exit_batch_rtnl() method Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 05/16] bonding: " Eric Dumazet
2024-02-02 19:34   ` Jay Vosburgh
2024-02-02 17:39 ` [PATCH v2 net-next 06/16] geneve: " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 07/16] gtp: " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 08/16] ipv4: add __unregister_nexthop_notifier() Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 09/16] vxlan: use exit_batch_rtnl() method Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 10/16] ip6_gre: " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 11/16] ip6_tunnel: " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 12/16] ip6_vti: " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 13/16] sit: " Eric Dumazet
2024-02-02 17:39 ` [PATCH v2 net-next 14/16] ip_tunnel: " Eric Dumazet
2024-02-02 17:40 ` [PATCH v2 net-next 15/16] bridge: " Eric Dumazet
2024-02-04  5:10   ` Jakub Kicinski
2024-02-04 10:15     ` Eric Dumazet
2024-02-02 17:40 ` [PATCH v2 net-next 16/16] xfrm: interface: " Eric Dumazet

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).