Commit f3054152 authored by Thomas Zeitlhofer's avatar Thomas Zeitlhofer Committed by Jiri Kosina
Browse files

HID: wacom: fix crash in wacom_aes_battery_handler()



Commit fd2a9b29 ("HID: wacom: Remove AES power_supply after extended
inactivity") introduced wacom_aes_battery_handler() which is scheduled
as a delayed work (aes_battery_work).

In wacom_remove(), aes_battery_work is not canceled. Consequently, if
the device is removed while aes_battery_work is still pending, then hard
crashes or "Oops: general protection fault..." are experienced when
wacom_aes_battery_handler() is finally called. E.g., this happens with
built-in USB devices after resume from hibernate when aes_battery_work
was still pending at the time of hibernation.

So, take care to cancel aes_battery_work in wacom_remove().

Fixes: fd2a9b29 ("HID: wacom: Remove AES power_supply after extended inactivity")
Signed-off-by: default avatarThomas Zeitlhofer <thomas.zeitlhofer+lkml@ze-it.at>
Acked-by: default avatarPing Cheng <ping.cheng@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 5cdb49a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment