Skip to content

Commit 48e487b

Browse files
stuarthayhurstJiri Kosina
authored andcommitted
HID: corsair-void: Add missing delayed work cancel for headset status
The cancel_delayed_work_sync() call was missed, causing a use-after-free in corsair_void_remove(). Reported-by: yan kang <[email protected]> Reported-by: yue sun <[email protected]> Closes: https://lore.kernel.org/all/SY8P300MB042106286A2536707D2FB736A1E42@SY8P300MB0421.AUSP300.PROD.OUTLOOK.COM/ Closes: https://lore.kernel.org/all/SY8P300MB0421872E0AE934C9616FA61EA1E42@SY8P300MB0421.AUSP300.PROD.OUTLOOK.COM/ Fixes: 6ea2a6f ("HID: corsair-void: Add Corsair Void headset family driver") Cc: [email protected] Signed-off-by: Stuart Hayhurst <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 27c0278 commit 48e487b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hid-corsair-void.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ static void corsair_void_remove(struct hid_device *hid_dev)
726726
if (drvdata->battery)
727727
power_supply_unregister(drvdata->battery);
728728

729+
cancel_delayed_work_sync(&drvdata->delayed_status_work);
729730
cancel_delayed_work_sync(&drvdata->delayed_firmware_work);
730731
sysfs_remove_group(&hid_dev->dev.kobj, &corsair_void_attr_group);
731732
}

0 commit comments

Comments
 (0)