Skip to content

Commit b051ffa

Browse files
endriftJiri Kosina
authored and
Jiri Kosina
committed
HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context
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: cd438e5 ("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]>
1 parent 7950424 commit b051ffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-steam.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ static void steam_do_deck_input_event(struct steam_device *steam,
16171617

16181618
if (!(b9 & BIT(6)) && steam->did_mode_switch) {
16191619
steam->did_mode_switch = false;
1620-
cancel_delayed_work_sync(&steam->mode_switch);
1620+
cancel_delayed_work(&steam->mode_switch);
16211621
} else if (!steam->client_opened && (b9 & BIT(6)) && !steam->did_mode_switch) {
16221622
steam->did_mode_switch = true;
16231623
schedule_delayed_work(&steam->mode_switch, 45 * HZ / 100);

0 commit comments

Comments
 (0)