2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/Documentation/networking
Stanislav Fomichev 04efcee6ef net: hold instance lock during NETDEV_CHANGE
Cosmin reports an issue with ipv6_add_dev being called from
NETDEV_CHANGE notifier:

[ 3455.008776]  ? ipv6_add_dev+0x370/0x620
[ 3455.010097]  ipv6_find_idev+0x96/0xe0
[ 3455.010725]  addrconf_add_dev+0x1e/0xa0
[ 3455.011382]  addrconf_init_auto_addrs+0xb0/0x720
[ 3455.013537]  addrconf_notify+0x35f/0x8d0
[ 3455.014214]  notifier_call_chain+0x38/0xf0
[ 3455.014903]  netdev_state_change+0x65/0x90
[ 3455.015586]  linkwatch_do_dev+0x5a/0x70
[ 3455.016238]  rtnl_getlink+0x241/0x3e0
[ 3455.019046]  rtnetlink_rcv_msg+0x177/0x5e0

Similarly, linkwatch might get to ipv6_add_dev without ops lock:
[ 3456.656261]  ? ipv6_add_dev+0x370/0x620
[ 3456.660039]  ipv6_find_idev+0x96/0xe0
[ 3456.660445]  addrconf_add_dev+0x1e/0xa0
[ 3456.660861]  addrconf_init_auto_addrs+0xb0/0x720
[ 3456.661803]  addrconf_notify+0x35f/0x8d0
[ 3456.662236]  notifier_call_chain+0x38/0xf0
[ 3456.662676]  netdev_state_change+0x65/0x90
[ 3456.663112]  linkwatch_do_dev+0x5a/0x70
[ 3456.663529]  __linkwatch_run_queue+0xeb/0x200
[ 3456.663990]  linkwatch_event+0x21/0x30
[ 3456.664399]  process_one_work+0x211/0x610
[ 3456.664828]  worker_thread+0x1cc/0x380
[ 3456.665691]  kthread+0xf4/0x210

Reclassify NETDEV_CHANGE as a notifier that consistently runs under the
instance lock.

Link: https://lore.kernel.org/netdev/aac073de8beec3e531c86c101b274d434741c28e.camel@nvidia.com/
Reported-by: Cosmin Ratiu <cratiu@nvidia.com>
Tested-by: Cosmin Ratiu <cratiu@nvidia.com>
Fixes: ad7c7b2172 ("net: hold netdev instance lock during sysfs operations")
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250404161122.3907628-1-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-04-07 11:13:39 -07:00
..
caif
device_drivers powerpc updates for 6.15 2025-03-27 19:39:08 -07:00
devlink bnxt_en: Add devlink support for ENABLE_ROCE nvm parameter 2025-03-18 10:25:22 +01:00
diagnostic Documentation: networking: update PHY error counter diagnostics in twisted pair guide 2025-01-14 11:44:19 +01:00
dsa net: dsa: Rename IFLA_DSA_MASTER to IFLA_DSA_CONDUIT 2023-10-24 13:08:14 -07:00
mac80211_hwsim
net_cachelines tcp/dccp: remove icsk->icsk_ack.timeout 2025-03-25 10:34:33 -07:00
netlink_spec tools: ynl: move python code to separate sub-directory 2025-01-09 12:53:27 -08:00
pse-pd net: pse-pd: Add support for PSE PIs 2024-04-18 18:27:33 -07:00
6lowpan.rst
6pack.rst
af_xdp.rst Revert "xsk: Document ability to redirect to any socket bound to the same umem" 2024-06-05 09:43:05 +02:00
alias.rst
arcnet-hardware.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
arcnet.rst
atm.rst
ax25.rst Documentation: netdev: fix dead link in ax25.rst 2023-09-18 12:56:58 +01:00
bareudp.rst docs: net: bareudp: fix spelling and grammar mistakes 2024-11-30 13:54:28 -08:00
batman-adv.rst batman-adv: Use consistent name for mesh interface 2025-02-22 11:36:22 +01:00
bonding.rst docs: net: bonding: fix typos 2024-12-18 17:27:35 -08:00
bridge.rst Documentation: update mailing list addresses 2024-02-21 13:44:21 -07:00
can_ucan_protocol.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
can.rst documentation: networking: fix spelling mistakes 2025-01-27 14:26:06 -08:00
cdc_mbim.rst Fix spelling mistake 2024-11-28 12:08:32 +01:00
checksum-offloads.rst
dccp.rst
dctcp.rst
devmem.rst docs: fix the path of example code and example commands for device memory TCP 2025-03-24 12:12:09 -07:00
dns_resolver.rst dns_resolver: correct module name in dns resolver documentation 2024-03-26 10:15:36 +01:00
driver.rst net: docs: update the sample code in driver.rst 2023-04-13 13:30:21 +02:00
eql.rst
ethtool-netlink.rst ethtool: Symmetric OR-XOR RSS hash 2025-02-25 18:31:04 -08:00
failover.rst
fib_trie.rst
filter.rst ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
gen_stats.rst
generic_netlink.rst Documentation: networking: Update generic_netlink_howto URL 2022-11-23 17:25:02 -08:00
generic-hdlc.rst
gtp.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
ieee802154.rst Documentation: ieee802154: fix grammar 2024-10-28 21:14:27 +01:00
ila.rst
index.rst net: add documentation for io_uring zcrx 2025-02-17 05:41:09 -07:00
ioam6-sysctl.rst ipv6: ioam: Documentation for new IOAM sysctls 2021-07-21 08:14:33 -07:00
iou-zcrx.rst net: add documentation for io_uring zcrx 2025-02-17 05:41:09 -07:00
ip_dynaddr.rst
ip-sysctl.rst tcp: support TCP_RTO_MIN_US for set/getsockopt use 2025-03-25 04:27:19 -07:00
ipsec.rst
ipv6.rst
ipvlan.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
ipvs-sysctl.rst ipvs: run_estimation should control the kthread tasks 2022-12-10 22:44:43 +01:00
iso15765-2.rst Documentation/networking: fix basic node example document ISO 15765-2 2025-02-08 11:28:11 +01:00
j1939.rst can: j1939: Extend stack documentation with buffer size behavior 2025-02-19 11:10:53 +01:00
kapi.rst net-shapers: implement NL get operation 2024-10-10 08:30:22 -07:00
kcm.rst docs/kcm: Fix typo "BFP" 2025-03-24 12:20:42 -07:00
l2tp.rst documentation/networking: update l2tp docs 2024-08-11 04:38:49 +01:00
lapb-module.rst
mac80211-auth-assoc-deauth.txt
mac80211-injection.rst
mctp.rst mctp: Add SIOCMCTP{ALLOC,DROP}TAG ioctls for tag control 2022-02-09 12:00:11 +00:00
mpls-sysctl.rst
mptcp-sysctl.rst mptcp: sysctl: add available_path_managers 2025-03-20 10:14:49 +01:00
mptcp.rst doc: new 'mptcp' page in 'networking' 2024-06-01 15:18:01 -07:00
msg_zerocopy.rst docs: net: description of MSG_ZEROCOPY for AF_VSOCK 2023-10-15 13:19:42 +01:00
multi-pf-netdev.rst tools: ynl: move python code to separate sub-directory 2025-01-09 12:53:27 -08:00
multiqueue.rst
napi.rst documentation: networking: Add NAPI config 2025-02-14 17:09:19 -08:00
net_dim.rst dim: pass dim_sample to net_dim() by reference 2024-11-03 12:36:54 -08:00
net_failover.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
netconsole.rst docs: netconsole: document release feature 2025-03-21 18:59:25 +01:00
netdev-features.rst netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
netdevices.rst net: hold instance lock during NETDEV_CHANGE 2025-04-07 11:13:39 -07:00
netfilter-sysctl.rst
netif-msg.rst
netmem.rst net: Document netmem driver support 2024-12-19 19:12:36 -08:00
nexthop-group-resilient.rst
nf_conntrack-sysctl.rst netfilter: conntrack: documentation: remove reference to non-existent sysctl 2024-05-06 16:29:21 +02:00
nf_flowtable.rst
nfc.rst
oa-tc6-framework.rst Documentation: networking: add OPEN Alliance 10BASE-T1x MAC-PHY serial interface 2024-09-11 20:53:42 -07:00
openvswitch.rst
operstates.rst docs: operstates: document IF_OPER_TESTING 2021-08-02 15:16:04 +01:00
packet_mmap.rst docs: networking: packet_mmap: replace dead links with archive.org links 2024-10-28 15:47:10 -07:00
page_pool.rst net: page_pool: expose page pool stats via netlink 2023-11-28 15:48:39 +01:00
phonet.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
phy-link-topology.rst Documentation: networking: document phy_link_topology 2024-08-23 13:04:35 +01:00
phy.rst net: phy: introduce core support for phy-mode = "10g-qxgmii" 2024-06-18 13:28:26 +02:00
pktgen.rst pktgen: Introducing 'SHARED' flag for testing with non-shared skb 2023-09-28 16:25:14 +02:00
plip.rst
ppp_generic.rst
proc_net_tcp.rst
radiotap-headers.rst
rds.rst Doc: networking: Fix the title's Sphinx overline in rds.rst 2021-11-29 15:18:21 -07:00
regulatory.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
representors.rst Documentation: Add documentation for eswitch attribute 2024-03-28 18:20:08 -07:00
rxrpc.rst rxrpc: Fix potential race in error handling in afs_make_call() 2023-04-22 15:16:39 +01:00
scaling.rst net: move aRFS rmap management and CPU affinity to core 2025-02-26 19:51:37 -08:00
sctp.rst
secid.rst
seg6-sysctl.rst
segmentation-offloads.rst
sfp-phylink.rst doc: sfp-phylink: update the porting guide with PCS handling 2024-03-07 15:27:05 +01:00
skbuff.rst skbuff: render the checksum comment to documentation 2022-05-10 17:48:37 -07:00
smc-sysctl.rst net/smc: add sysctl for max conns per lgr for SMC-R v2.1 2023-11-24 12:13:14 +00:00
snmp_counter.rst docs: automarkup: linkify git revs 2023-11-17 13:13:24 -07:00
sriov.rst docs: net: document guidance of implementing the SR-IOV NDOs 2024-06-21 10:18:45 +01:00
statistics.rst docs: networking: Allow creating cross-references statistics ABI 2025-02-18 13:42:46 -07:00
strparser.rst docs: networking: strparser: Fix a typo 2025-03-24 12:14:16 -07:00
switchdev.rst net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
sysfs-tagging.rst Documentation: networking: correct spelling 2023-01-31 13:00:47 +01:00
tc-actions-env-rules.rst
tc-queue-filters.rst Documentation: networking: TC queue based filtering 2022-10-25 10:32:40 +02:00
tcp_ao.rst Documentation: networking/tcp_ao: typo and grammar fixes 2024-10-03 16:38:48 -07:00
tcp-thin.rst
team.rst
timestamping.rst net-timestamp: COMPLETION timestamp on packet tx completion 2025-03-25 12:48:05 -04:00
tipc.rst Documentation: tipc: fix formatting issue in tipc.rst 2024-11-19 11:17:13 +01:00
tls-handshake.rst net/handshake: Enable the SNI extension to work properly 2023-05-24 22:05:24 -07:00
tls-offload-layers.svg
tls-offload-reorder-bad.svg
tls-offload-reorder-good.svg
tls-offload.rst Documentation: tls_offload: fix typos and grammar 2024-11-28 12:09:06 +01:00
tls.rst docs: tls: document TLS1.3 key updates 2024-12-16 12:47:30 +00:00
tproxy.rst docs: tproxy: ignore non-transparent sockets in iptables 2024-09-26 13:03:01 +02:00
tuntap.rst
udplite.rst
vrf.rst doc: Document unexpected tcp_l3mdev_accept=1 behavior 2021-08-23 11:53:24 +01:00
vxlan.rst
x25-iface.rst docs: networking: fix x25-iface.rst heading & index order 2023-05-10 10:31:46 +01:00
x25.rst
xdp-rx-metadata.rst xdp: Add VLAN tag hint 2023-12-13 16:16:40 -08:00
xfrm_device.rst xfrm: provide common xdo_dev_offload_ok callback implementation 2025-02-21 08:08:15 +01:00
xfrm_proc.rst xfrm: Add dir validation to "in" data path lookup 2024-05-01 10:06:27 +02:00
xfrm_sync.rst
xfrm_sysctl.rst
xsk-tx-metadata.rst xsk: Add launch time hardware offload support to XDP Tx metadata 2025-02-20 15:13:45 -08:00