]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2025 17:41:47 +0000 (18:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2025 17:41:47 +0000 (18:41 +0100)
added patches:
hid-hid-steam-don-t-use-cancel_delayed_work_sync-in-irq-context.patch

queue-6.6/hid-hid-steam-don-t-use-cancel_delayed_work_sync-in-irq-context.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/hid-hid-steam-don-t-use-cancel_delayed_work_sync-in-irq-context.patch b/queue-6.6/hid-hid-steam-don-t-use-cancel_delayed_work_sync-in-irq-context.patch
new file mode 100644 (file)
index 0000000..8451224
--- /dev/null
@@ -0,0 +1,34 @@
+From b051ffa2aeb2a60e092387b6fb2af1ad42f51a3c Mon Sep 17 00:00:00 2001
+From: Vicki Pfau <vi@endrift.com>
+Date: Tue, 4 Feb 2025 19:55:29 -0800
+Subject: HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context
+
+From: Vicki Pfau <vi@endrift.com>
+
+commit b051ffa2aeb2a60e092387b6fb2af1ad42f51a3c upstream.
+
+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 <vi@endrift.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/hid-steam.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hid/hid-steam.c
++++ b/drivers/hid/hid-steam.c
+@@ -1615,7 +1615,7 @@ static void steam_do_deck_input_event(st
+       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);
index 3862c6f58551925372389d5350d58145dcaee67a..b15e3570e553d6d47ca1df6d02ad951f933a357b 100644 (file)
@@ -144,3 +144,4 @@ md-md-bitmap-move-bitmap_-start-end-write-to-md-upper-layer.patch
 arm64-filter-out-sve-hwcaps-when-feat_sve-isn-t-implemented.patch
 mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch
 alpha-replace-hardcoded-stack-offsets-with-autogenerated-ones.patch
+hid-hid-steam-don-t-use-cancel_delayed_work_sync-in-irq-context.patch