]> Git Repo - linux.git/commitdiff
HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context
authorVicki Pfau <[email protected]>
Wed, 5 Feb 2025 03:55:29 +0000 (19:55 -0800)
committerJiri Kosina <[email protected]>
Fri, 7 Feb 2025 13:27:48 +0000 (14:27 +0100)
Lockdep reported that, as steam_do_deck_input_event is called from
steam_raw_event inside of an IRQ context, it can lead to issues if that IRQ
occurs while the work to be cancelled is running. By using cancel_delayed_work,
this issue can be avoided. The exact ordering of the work and the event
processing is not super important, so this is safe.

Fixes: cd438e57dd05 ("HID: hid-steam: Add gamepad-only mode switched to by holding options")
Signed-off-by: Vicki Pfau <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/hid-steam.c

index 5a17714fedea0f676e3207a4d0902e5a6100c036..c9e65e9088b312514f58912323724c617081210e 100644 (file)
@@ -1617,7 +1617,7 @@ static void steam_do_deck_input_event(struct steam_device *steam,
 
        if (!(b9 & BIT(6)) && steam->did_mode_switch) {
                steam->did_mode_switch = false;
-               cancel_delayed_work_sync(&steam->mode_switch);
+               cancel_delayed_work(&steam->mode_switch);
        } else if (!steam->client_opened && (b9 & BIT(6)) && !steam->did_mode_switch) {
                steam->did_mode_switch = true;
                schedule_delayed_work(&steam->mode_switch, 45 * HZ / 100);
This page took 0.043506 seconds and 4 git commands to generate.