linux/net
Kuniyuki Iwashima d0008553a7 net: Call unregister_netdevice_many() per netns.
For per-netns device unregistration, the list passed to
unregister_netdevice_many() must contain devices from a single
netns only (once all callers are converted).

Let's move collected devices in the following functions to
net->dev_unreg_head and let __rtnl_net_unlock() pass them to
unregister_netdevice_many().

  * default_device_exit_batch()
  * ops_exit_rtnl_list()
  * __rtnl_kill_links()

This allows incremental conversion of each driver to support
per-netns device unregistration without affecting the normal
kernel where CONFIG_DEBUG_NET_SMALL_RTNL is disabled.

Note that this change unbatches synchronize_rcu() etc in
unregister_netdevice_many(), but we can later split it into
multiple stages to batch them again.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260703001009.1572444-8-kuniyu@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-11 12:57:50 +02:00
..
6lowpan 6lowpan: fix NHC entry use-after-free on error path 2026-06-11 15:27:07 -07:00
9p 9p: Add missing read barrier in virtio zero-copy path 2026-06-21 05:22:57 +00:00
802 appletalk: move the protocol out of tree 2026-06-16 14:37:06 -07:00
8021q vlan: defer real device state propagation to netdev_work 2026-06-25 10:18:40 -07:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-16 14:59:58 -07:00
batman-adv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-10 10:20:05 +02:00
bluetooth Bluetooth: L2CAP: fix tx ident leak for commands without a response 2026-07-06 10:46:58 -04:00
bpf bpf: Fix partial copy of non-linear test_run output 2026-06-21 17:55:06 -07:00
bridge Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-10 10:20:05 +02:00
can Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
ceph libceph: Fix potential null-ptr-deref in decode_choose_args() 2026-05-12 21:00:59 +02:00
core net: Call unregister_netdevice_many() per netns. 2026-07-11 12:57:50 +02:00
dcb
devlink devlink: print controller prefix for non-zero controller 2026-07-08 11:23:49 +02:00
dns_resolver net/dns_resolver: use kasprintf + kmemdup_nul to simplify dns_query 2026-06-04 18:39:29 -07:00
dsa net: dsa: hold instance lock on close-on-shutdown paths 2026-07-07 15:31:36 +02:00
ethernet
ethtool ethtool: rss: Fix hfunc and input_xfrm parsing on big endian 2026-07-09 11:38:30 +02:00
handshake handshake: Require admin permission for DONE command 2026-06-12 15:45:44 -07:00
hsr net: hsr: simplify fill_last_seq_nrs() 2026-06-12 16:20:28 -07:00
ieee802154 ieee802154: allow legacy LLSEC ADD/DEL ops to pass strict validation 2026-06-19 23:02:42 +02:00
ife net: ife: require ETH_HLEN to be pullable in ife_decode() 2026-06-13 17:34:39 -07:00
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-10 10:20:05 +02:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-10 10:20:05 +02:00
iucv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-05-28 14:02:21 -07:00
kcm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-16 14:59:58 -07:00
key ipsec-2026-06-22 2026-06-23 16:22:24 -07:00
l2tp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-04 15:29:04 -07:00
l3mdev
lapb
llc llc: fix SAP refcount leak in llc_ui_autobind() 2026-07-05 09:05:14 +02:00
mac80211 Quite a few last updates, notably: 2026-06-10 07:59:45 -07:00
mac802154 mac802154: remove interfaces with RCU list deletion 2026-07-03 16:14:23 +02:00
mctp mctp: convert to getsockopt_iter 2026-05-10 10:11:07 -07:00
mpls net: Remove rtnl_held of struct fib_dump_filter. 2026-06-08 17:06:23 -07:00
mptcp mptcp: options: rst: drop unused skb parameter 2026-06-11 15:33:39 -07:00
ncsi
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-10 10:20:05 +02:00
netlabel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-11 14:33:35 -07:00
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-05-28 14:02:21 -07:00
nfc nfc: nci: uart: Constify struct tty_ldisc_ops 2026-06-11 20:21:32 +02:00
nsh
openvswitch openvswitch: conntrack: annotate ct limit hlist traversal 2026-06-25 08:38:00 -07:00
packet net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd() 2026-04-22 20:16:34 -07:00
phonet net: phonet: free phonet_device after RCU grace period 2026-06-08 17:37:07 -07:00
psample net: psample: fix info leak in PSAMPLE_ATTR_DATA 2026-06-17 16:35:50 -07:00
psp psp: add a new netdev event for dev unregister 2026-06-12 18:31:32 -07:00
qrtr Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
rds Including fixes from netfilter and IPsec. 2026-06-25 12:25:36 -07:00
rfkill Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
rxrpc rxrpc: Fix rxrpc_rotate_tx_rotate() to check there's something to rotate 2026-06-25 10:07:19 -07:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-07-10 10:20:05 +02:00
sctp sctp: fix addr_wq_timer race in sctp_free_addr_wq() 2026-06-30 16:58:59 -07:00
shaper net: shaper: add a note that we expect cap dumps to be tiny 2026-06-11 12:55:23 +02:00
smc net/smc: fix UAF in smc_cdc_rx_handler() by pinning the socket 2026-07-06 12:58:12 +02:00
strparser net: strparser: fix skb_head leak in strp_abort_strp() 2026-04-14 12:37:00 +02:00
sunrpc NFS Client Updates for Linux 7.2 2026-06-23 18:36:41 -07:00
switchdev
tipc tipc: fix out-of-bounds read in broadcast Gap ACK blocks 2026-06-29 17:30:20 -07:00
tls net/tls: Consume empty data records in tls_sw_read_sock() 2026-07-07 10:12:11 +02:00
unix Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-04 15:29:04 -07:00
vmw_vsock vsock/virtio: rewrite MSG_ZEROCOPY flag handling 2026-06-30 15:59:18 +02:00
wireless Quite a few last updates, notably: 2026-06-10 07:59:45 -07:00
x25 x25: convert to getsockopt_iter 2026-05-10 10:11:08 -07:00
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-04 15:29:04 -07:00
xfrm ipsec-2026-06-22 2026-06-23 16:22:24 -07:00
compat.c net: Remove support for AIO on sockets 2026-05-29 14:05:30 +08:00
devres.c
Kconfig appletalk: move the protocol out of tree 2026-06-16 14:37:06 -07:00
Kconfig.debug
Makefile appletalk: move the protocol out of tree 2026-06-16 14:37:06 -07:00
socket.c Networking changes for 7.2. 2026-06-17 08:17:00 +01:00
sysctl_net.c