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: ad7c7b2172c3 ("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
..
2025-03-27 19:39:08 -07:00
2025-03-18 10:25:22 +01:00
2025-01-14 11:44:19 +01:00
2023-10-24 13:08:14 -07:00
2025-03-25 10:34:33 -07:00
2025-01-09 12:53:27 -08:00
2024-04-18 18:27:33 -07:00
2024-06-05 09:43:05 +02:00
2023-01-31 13:00:47 +01:00
2023-09-18 12:56:58 +01:00
2024-11-30 13:54:28 -08:00
2025-02-22 11:36:22 +01:00
2024-12-18 17:27:35 -08:00
2024-02-21 13:44:21 -07:00
2023-01-31 13:00:47 +01:00
2025-01-27 14:26:06 -08:00
2024-11-28 12:08:32 +01:00
2025-03-24 12:12:09 -07:00
2024-03-26 10:15:36 +01:00
2023-04-13 13:30:21 +02:00
2025-02-25 18:31:04 -08:00
2024-05-12 16:51:36 -07:00
2022-11-23 17:25:02 -08:00
2023-01-31 13:00:47 +01:00
2024-10-28 21:14:27 +01:00
2025-02-17 05:41:09 -07:00
2021-07-21 08:14:33 -07:00
2025-02-17 05:41:09 -07:00
2025-03-25 04:27:19 -07:00
2023-01-31 13:00:47 +01:00
2022-12-10 22:44:43 +01:00
2025-02-08 11:28:11 +01:00
2025-02-19 11:10:53 +01:00
2024-10-10 08:30:22 -07:00
2025-03-24 12:20:42 -07:00
2024-08-11 04:38:49 +01:00
2022-02-09 12:00:11 +00:00
2025-03-20 10:14:49 +01:00
2024-06-01 15:18:01 -07:00
2023-10-15 13:19:42 +01:00
2025-01-09 12:53:27 -08:00
2025-02-14 17:09:19 -08:00
2024-11-03 12:36:54 -08:00
2023-01-31 13:00:47 +01:00
2025-03-21 18:59:25 +01:00
2024-09-03 11:36:43 +02:00
2025-04-07 11:13:39 -07:00
2024-12-19 19:12:36 -08:00
2024-05-06 16:29:21 +02:00
2024-09-11 20:53:42 -07:00
2021-08-02 15:16:04 +01:00
2024-10-28 15:47:10 -07:00
2023-11-28 15:48:39 +01:00
2023-01-31 13:00:47 +01:00
2024-08-23 13:04:35 +01:00
2024-06-18 13:28:26 +02:00
2023-09-28 16:25:14 +02:00
2021-11-29 15:18:21 -07:00
2023-01-31 13:00:47 +01:00
2024-03-28 18:20:08 -07:00
2023-04-22 15:16:39 +01:00
2025-02-26 19:51:37 -08:00
2024-03-07 15:27:05 +01:00
2022-05-10 17:48:37 -07:00
2023-11-24 12:13:14 +00:00
2023-11-17 13:13:24 -07:00
2024-06-21 10:18:45 +01:00
2025-02-18 13:42:46 -07:00
2025-03-24 12:14:16 -07:00
2025-03-04 12:44:48 +01:00
2023-01-31 13:00:47 +01:00
2022-10-25 10:32:40 +02:00
2024-10-03 16:38:48 -07:00
2025-03-25 12:48:05 -04:00
2024-11-19 11:17:13 +01:00
2023-05-24 22:05:24 -07:00
2024-11-28 12:09:06 +01:00
2024-12-16 12:47:30 +00:00
2024-09-26 13:03:01 +02:00
2021-08-23 11:53:24 +01:00
2023-05-10 10:31:46 +01:00
2023-12-13 16:16:40 -08:00
2025-02-21 08:08:15 +01:00
2024-05-01 10:06:27 +02:00
2025-02-20 15:13:45 -08:00