Satish Kharat
ec680ea4ba
enic: fix tx_hang_reset use-after-free on device removal
...
enic_remove() cancels the reset and change_mtu_work items but does not
cancel tx_hang_reset. A TX timeout that fires while the device is being
removed can schedule enic_tx_hang_reset() so that it runs after
free_netdev(), resulting in a use-after-free.
cancel_work_sync() alone is not sufficient here: the still-live watchdog
and notify paths can re-schedule these work items in the window between
the cancel and unregister_netdev(). Use disable_work_sync(), which
cancels the work and blocks any subsequent schedule_work() from
requeuing it, and apply it to the reset and change_mtu_work items as
well so the same requeue race is closed for all teardown work.
Fixes: 937317c7c1 ("enic: do hang reset only in case of tx timeout")
Signed-off-by: Satish Kharat <satishkh@cisco.com >
Link: https://patch.msgid.link/20260728062730.2394873-1-satishkh@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2026-07-30 16:41:22 -07:00
..
2026-07-21 15:21:56 -05:00
2026-07-03 15:13:50 -10:00
2026-07-17 15:30:09 +02:00
2026-07-17 17:58:57 -07:00
2026-06-16 08:53:53 -07:00
2026-07-03 07:38:17 +02:00
2026-06-26 10:47:26 -07:00
2026-07-24 20:02:58 -07:00
2026-07-28 16:13:48 -04:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-20 21:54:52 -06:00
2026-07-03 07:38:17 +02:00
2026-07-12 12:52:34 -07:00
2026-07-03 07:38:17 +02:00
2026-06-15 13:57:13 +05:30
2026-07-17 14:50:35 +02:00
2026-07-03 07:38:17 +02:00
2026-07-09 20:31:57 +02:00
2026-06-23 14:00:29 +02:00
2026-07-03 07:38:17 +02:00
2026-06-12 13:47:53 -07:00
2026-06-19 10:14:34 -07:00
2026-07-03 07:38:17 +02:00
2026-07-29 16:46:51 -07:00
2026-07-03 07:38:17 +02:00
2026-07-10 16:26:39 -07:00
2026-07-24 16:15:19 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-13 20:19:06 +09:00
2026-07-26 10:47:58 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-27 15:07:51 +02:00
2026-07-24 09:30:17 -05:00
2026-07-12 12:37:28 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-06-22 08:06:13 -07:00
2026-07-20 07:29:44 -07:00
2026-06-08 21:51:12 -05:00
2026-07-17 14:52:08 +02:00
2026-07-15 00:21:51 +02:00
2026-06-16 23:19:45 +02:00
2026-06-15 15:08:14 +05:30
2026-07-12 12:37:28 -07:00
2026-07-23 10:24:12 -07:00
2026-07-11 15:42:55 -07:00
2026-07-03 07:38:17 +02:00
2026-07-21 11:34:51 +00:00
2026-07-05 05:29:41 -10:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-11 15:18:51 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-06 17:09:30 +02:00
2026-07-03 07:38:17 +02:00
2026-07-17 14:51:57 +02:00
2026-07-15 11:00:02 +02:00
2026-07-17 09:30:17 -07:00
2026-07-03 07:38:17 +02:00
2026-07-30 16:41:22 -07:00
2026-07-03 07:38:17 +02:00
2026-06-28 07:46:12 -07:00
2026-06-18 16:27:58 -07:00
2026-06-25 09:56:47 -07:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-27 08:48:48 -07:00
2026-07-28 13:45:01 -07:00
2026-07-13 12:42:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-03 07:38:17 +02:00
2026-07-29 17:54:06 -07:00
2026-07-03 07:38:17 +02:00
2026-06-21 13:20:19 -07:00
2026-06-16 05:31:01 +05:30
2026-07-21 22:35:08 +01:00
2026-06-08 21:53:51 -05:00
2026-07-16 14:46:27 +01:00
2026-07-10 14:15:39 +02:00
2026-06-20 23:31:15 -07:00
2026-07-03 07:38:17 +02:00
2026-07-27 18:05:19 -07:00
2026-07-12 22:21:22 -04:00
2026-07-03 07:38:17 +02:00
2026-06-05 17:19:51 +02:00
2026-07-10 14:42:00 +02:00
2026-07-03 07:38:17 +02:00
2026-07-19 22:12:52 +01:00
2026-07-03 07:38:17 +02:00
2026-07-17 14:23:13 +02:00
2026-07-12 22:21:22 -04:00
2026-06-17 11:21:40 -07:00
2026-07-03 07:38:17 +02:00
2026-06-22 12:09:47 -07:00
2026-07-17 13:07:32 +02:00
2026-07-08 21:51:36 -04:00
2026-07-17 14:50:09 +02:00
2026-07-24 15:36:52 +02:00
2026-07-03 07:38:17 +02:00
2026-06-29 14:26:31 -06:00
2026-07-29 17:12:27 -07:00
2026-07-03 07:38:17 +02:00
2026-07-17 18:49:12 +01:00
2026-07-09 15:48:56 -07:00
2026-07-03 07:38:17 +02:00
2026-07-22 11:15:49 -07:00
2026-07-18 12:36:19 -07:00