Skip to content

Commit 245cd1c

Browse files
committed
HID: wacom: fix crash in wacom_aes_battery_handler()
JIRA: https://issues.redhat.com/browse/RHEL-102058 Upstream Status: v6.16 commit f305415 Author: Thomas Zeitlhofer <[email protected]> Date: Mon May 19 10:54:46 2025 +0200 HID: wacom: fix crash in wacom_aes_battery_handler() Commit fd2a9b2 ("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: fd2a9b2 ("HID: wacom: Remove AES power_supply after extended inactivity") Signed-off-by: Thomas Zeitlhofer <[email protected]> Acked-by: Ping Cheng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 03b80e4 commit 245cd1c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/wacom_sys.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,6 +2903,7 @@ static void wacom_remove(struct hid_device *hdev)
29032903
hid_hw_stop(hdev);
29042904

29052905
cancel_delayed_work_sync(&wacom->init_work);
2906+
cancel_delayed_work_sync(&wacom->aes_battery_work);
29062907
cancel_work_sync(&wacom->wireless_work);
29072908
cancel_work_sync(&wacom->battery_work);
29082909
cancel_work_sync(&wacom->remote_work);

0 commit comments

Comments
 (0)