Files
linux/drivers
Benjamin Tissoires ecf041d477 ODROID-C5: HID: mcp-2221: prevent UAF in delayed work
If the device is plugged/unplugged without giving time for mcp_init_work()
to complete, we might kick in the devm free code path and thus have
unavailable struct mcp_2221 while in delayed work.

Canceling the delayed_work item is enough to solve the issue, because
cancel_delayed_work_sync will prevent the work item to requeue itself.

Fixes: 960f9df7c6 ("HID: mcp2221: add ADC/DAC support via iio subsystem")
CC: stable@vger.kernel.org
Acked-by: Jiri Kosina <jkosina@suse.cz>
Link: https://lore.kernel.org/r/20230215-wip-mcp2221-v2-1-109f71fd036e@redhat.com
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Change-Id: I35ca79b8a7b96dc72c702af8ea79d4c5ca92935f
2025-11-07 15:23:54 +09:00
..
2023-09-19 12:22:47 +02:00
2025-01-17 15:07:00 +09:00
2023-11-20 11:08:27 +01:00
2025-11-07 15:15:27 +09:00
2025-11-07 15:16:22 +09:00
2025-01-17 15:07:02 +09:00
2023-11-20 11:08:22 +01:00
2025-11-07 15:15:27 +09:00
2024-02-23 08:54:38 +01:00
2024-01-25 14:52:31 -08:00
2024-03-26 18:21:36 -04:00
2023-07-23 13:47:20 +02:00