]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jan 2022 16:23:12 +0000 (17:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jan 2022 16:23:12 +0000 (17:23 +0100)
added patches:
hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch

queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch b/queue-5.15/hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch
new file mode 100644 (file)
index 0000000..b374b28
--- /dev/null
@@ -0,0 +1,36 @@
+From 33812fc7c8d77a43b7e2bf36a0d5a57c277a4b0c Mon Sep 17 00:00:00 2001
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Tue, 28 Dec 2021 22:09:17 +0100
+Subject: HID: magicmouse: Fix an error handling path in magicmouse_probe()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+commit 33812fc7c8d77a43b7e2bf36a0d5a57c277a4b0c upstream.
+
+If the timer introduced by the commit below is started, then it must be
+deleted in the error handling of the probe. Otherwise it would trigger
+once the driver is no more.
+
+Fixes: 0b91b4e4dae6 ("HID: magicmouse: Report battery level over USB")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Tested-by: José Expósito <jose.exposito89@gmail.com>
+Reported-by: <syzbot+a437546ec71b04dfb5ac@syzkaller.appspotmail.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/hid-magicmouse.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/hid/hid-magicmouse.c
++++ b/drivers/hid/hid-magicmouse.c
+@@ -873,6 +873,7 @@ static int magicmouse_probe(struct hid_d
+       return 0;
+ err_stop_hw:
++      del_timer_sync(&msc->battery_timer);
+       hid_hw_stop(hdev);
+       return ret;
+ }
index 7f6d674a2cc47ecb534a9575e45ab626f288b1dd..125b270713b4ece40826ba97cd2a4a5aca54324f 100644 (file)
@@ -676,3 +676,4 @@ mfd-tps65910-set-pwr_off-bit-during-driver-probe.patch
 spi-uniphier-fix-a-bug-that-doesn-t-point-to-private-data-correctly.patch
 xen-gntdev-fix-unmap-notification-order.patch
 md-move-alloc-free-acct-bioset-in-to-personality.patch
+hid-magicmouse-fix-an-error-handling-path-in-magicmouse_probe.patch