diff options
author | Benjamin Tissoires <[email protected]> | 2023-02-16 11:22:58 +0100 |
---|---|---|
committer | Benjamin Tissoires <[email protected]> | 2023-02-20 10:21:01 +0100 |
commit | 47e91fdfa511139f2549687edb0d8649b123227b (patch) | |
tree | 1b001c5f5c7d3719e04ef278cbd1b9ff27b35d50 /drivers/usb/cdns3/cdns3-debug.h | |
parent | 0b028189d1019ca352da108643b8f1503ee25a0e (diff) |
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: 960f9df7c620 ("HID: mcp2221: add ADC/DAC support via iio subsystem")
CC: [email protected]
Acked-by: Jiri Kosina <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Benjamin Tissoires <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions