Reka Norman 8ae2f2b0a2 HID: intel-ish-hid: ipc: Fix potential use-after-free in work function
When a reset notify IPC message is received, the ISR schedules a work
function and passes the ISHTP device to it via a global pointer
ishtp_dev. If ish_probe() fails, the devm-managed device resources
including ishtp_dev are freed, but the work is not cancelled, causing a
use-after-free when the work function tries to access ishtp_dev. Use
devm_work_autocancel() instead, so that the work is automatically
cancelled if probe fails.

Signed-off-by: Reka Norman <rekanorman@chromium.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2023-03-03 15:06:11 +01:00
..
2023-02-22 11:24:42 -08:00
2023-02-22 11:24:42 -08:00
2023-02-22 11:24:42 -08:00
2022-07-21 13:47:12 +02:00
2022-02-02 15:12:22 +01:00
2022-08-25 11:32:31 +02:00