From: Greg Kroah-Hartman Date: Wed, 22 Dec 2021 12:50:17 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.4.297~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=59b72277e371bf90c60e9a8e01f70ca1eaf5d825;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: hid-holtek-fix-mouse-probing.patch --- diff --git a/queue-4.14/hid-holtek-fix-mouse-probing.patch b/queue-4.14/hid-holtek-fix-mouse-probing.patch new file mode 100644 index 00000000000..c75a8552000 --- /dev/null +++ b/queue-4.14/hid-holtek-fix-mouse-probing.patch @@ -0,0 +1,49 @@ +From 93a2207c254ca102ebbdae47b00f19bbfbfa7ecd Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Mon, 20 Dec 2021 10:51:20 +0100 +Subject: HID: holtek: fix mouse probing + +From: Benjamin Tissoires + +commit 93a2207c254ca102ebbdae47b00f19bbfbfa7ecd upstream. + +An overlook from the previous commit: we don't even parse or start the +device, meaning that the device is not presented to user space. + +Fixes: 93020953d0fa ("HID: check for valid USB device for many HID drivers") +Cc: stable@vger.kernel.org +Link: https://bugs.archlinux.org/task/73048 +Link: https://bugzilla.kernel.org/show_bug.cgi?id=215341 +Link: https://lore.kernel.org/r/e4efbf13-bd8d-0370-629b-6c80c0044b15@leemhuis.info/ +Signed-off-by: Benjamin Tissoires +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-holtek-mouse.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/drivers/hid/hid-holtek-mouse.c ++++ b/drivers/hid/hid-holtek-mouse.c +@@ -68,8 +68,23 @@ static __u8 *holtek_mouse_report_fixup(s + static int holtek_mouse_probe(struct hid_device *hdev, + const struct hid_device_id *id) + { ++ int ret; ++ + if (!hid_is_usb(hdev)) + return -EINVAL; ++ ++ ret = hid_parse(hdev); ++ if (ret) { ++ hid_err(hdev, "hid parse failed: %d\n", ret); ++ return ret; ++ } ++ ++ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); ++ if (ret) { ++ hid_err(hdev, "hw start failed: %d\n", ret); ++ return ret; ++ } ++ + return 0; + } + diff --git a/queue-4.14/series b/queue-4.14/series index 5e5e8801a85..9f87a9b2c38 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -1,2 +1,3 @@ net-usb-lan78xx-add-allied-telesis-at29m2-af.patch can-kvaser_usb-get-can-clock-frequency-from-device.patch +hid-holtek-fix-mouse-probing.patch