]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 15:18:52 +0000 (17:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 15:18:52 +0000 (17:18 +0200)
added patches:
hid-quirks-fix-support-for-apple-magic-keyboards.patch
usb-gadget-serial-fix-oops-when-data-rx-d-after-close.patch

queue-4.9/hid-quirks-fix-support-for-apple-magic-keyboards.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/usb-gadget-serial-fix-oops-when-data-rx-d-after-close.patch [new file with mode: 0644]

diff --git a/queue-4.9/hid-quirks-fix-support-for-apple-magic-keyboards.patch b/queue-4.9/hid-quirks-fix-support-for-apple-magic-keyboards.patch
new file mode 100644 (file)
index 0000000..5fbf322
--- /dev/null
@@ -0,0 +1,45 @@
+From ncopa@alpinelinux.org  Thu Oct 18 17:16:27 2018
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 18 Oct 2018 17:04:17 +0200
+Subject: HID: quirks: fix support for Apple Magic Keyboards
+To: linux stable <stable@vger.kernel.org>
+Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>, Natanael Copa <ncopa@alpinelinux.org>
+Message-ID: <20181018150417.22354-1-ncopa@alpinelinux.org>
+
+From: Natanael Copa <ncopa@alpinelinux.org>
+
+Commit b6cc0ba2cbf4 (HID: add support for Apple Magic Keyboards)
+backported support for the Magic Keyboard over Bluetooth, but did not
+add the BT_VENDOR_ID_APPLE to hid_have_special_driver[] so the hid-apple
+driver is never loaded and Fn key does not work at all.
+
+Adding BT_VENDOR_ID_APPLE to hid_have_special_driver[] is not needed
+after commit e04a0442d33b (HID: core: remove the absolute need of
+hid_have_special_driver[]), so 4.16 kernels and newer does not need it.
+
+Fixes: b6cc0ba2cbf4 (HID: add support for Apple Magic Keyboards)
+Bugzilla-id: https://bugzilla.kernel.org/show_bug.cgi?id=99881
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+
+Benjamin, thank you for your help with this.
+
+I believe this is needed for both linux-4.14.y and linux-4.9.y.
+
+ drivers/hid/hid-core.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -1853,6 +1853,9 @@ static const struct hid_device_id hid_ha
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
++      { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
++      { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) },
++      { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
+       { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_NOTEBOOK_KEYBOARD) },
index 6ce3ef5d658d85340b16541173d6d88ef78d1bed..748932d1362231274067fa51df935778947c1e8f 100644 (file)
@@ -25,3 +25,5 @@ mm-preserve-_page_devmap-across-mprotect-calls.patch
 netfilter-check-for-seqadj-ext-existence-before-adding-it-in-nf_nat_setup_info.patch
 arc-build-get-rid-of-toolchain-check.patch
 arc-build-don-t-set-cross_compile-in-arch-s-makefile.patch
+hid-quirks-fix-support-for-apple-magic-keyboards.patch
+usb-gadget-serial-fix-oops-when-data-rx-d-after-close.patch
diff --git a/queue-4.9/usb-gadget-serial-fix-oops-when-data-rx-d-after-close.patch b/queue-4.9/usb-gadget-serial-fix-oops-when-data-rx-d-after-close.patch
new file mode 100644 (file)
index 0000000..931b7f6
--- /dev/null
@@ -0,0 +1,35 @@
+From daa35bd95634a2a2d72d1049c93576a02711cb1a Mon Sep 17 00:00:00 2001
+From: Stephen Warren <swarren@nvidia.com>
+Date: Wed, 16 Aug 2017 14:30:10 -0600
+Subject: usb: gadget: serial: fix oops when data rx'd after close
+
+From: Stephen Warren <swarren@nvidia.com>
+
+commit daa35bd95634a2a2d72d1049c93576a02711cb1a upstream.
+
+When the gadget serial device has no associated TTY, do not pass any
+received data into the TTY layer for processing; simply drop it instead.
+This prevents the TTY layer from calling back into the gadget serial
+driver, which will then crash in e.g. gs_write_room() due to lack of
+gadget serial device to TTY association (i.e. a NULL pointer dereference).
+
+Signed-off-by: Stephen Warren <swarren@nvidia.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/function/u_serial.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/function/u_serial.c
++++ b/drivers/usb/gadget/function/u_serial.c
+@@ -537,7 +537,7 @@ static void gs_rx_push(unsigned long _po
+               }
+               /* push data to (open) tty */
+-              if (req->actual) {
++              if (req->actual && tty) {
+                       char            *packet = req->buf;
+                       unsigned        size = req->actual;
+                       unsigned        n;