]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Apr 2019 17:07:41 +0000 (19:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Apr 2019 17:07:41 +0000 (19:07 +0200)
added patches:
i2c-hid-properly-terminate-i2c_hid_dmi_desc_override_table-array.patch

queue-4.14/i2c-hid-properly-terminate-i2c_hid_dmi_desc_override_table-array.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/i2c-hid-properly-terminate-i2c_hid_dmi_desc_override_table-array.patch b/queue-4.14/i2c-hid-properly-terminate-i2c_hid_dmi_desc_override_table-array.patch
new file mode 100644 (file)
index 0000000..edc3b8b
--- /dev/null
@@ -0,0 +1,48 @@
+From b59dfdaef173677b0b7e10f375226c0a1114fd20 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Sat, 27 Oct 2018 09:10:48 -0700
+Subject: i2c-hid: properly terminate i2c_hid_dmi_desc_override_table[] array
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit b59dfdaef173677b0b7e10f375226c0a1114fd20 upstream.
+
+Commit 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain
+devices") added a new dmi_system_id quirk table to override certain HID
+report descriptors for some systems that lack them.
+
+But the table wasn't properly terminated, causing the dmi matching to
+walk off into la-la-land, and starting to treat random data as dmi
+descriptor pointers, causing boot-time oopses if you were at all
+unlucky.
+
+Terminate the array.
+
+We really should have some way to just statically check that arrays that
+should be terminated by an empty entry actually are so.  But the HID
+people really should have caught this themselves, rather than have me
+deal with an oops during the merge window.  Tssk, tssk.
+
+Cc: Julian Sax <jsbc@gmx.de>
+Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Cc: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Ambrož Bizjak <abizjak.pro@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c
++++ b/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c
+@@ -337,7 +337,8 @@ static const struct dmi_system_id i2c_hi
+                       DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
+               },
+               .driver_data = (void *)&sipodev_desc
+-      }
++      },
++      { }     /* Terminate list */
+ };
index ab45d91faf3f3e7434c528b2947c1ba5d81bee44..b990527e888427c9adc33a40920c48ec9f42a247 100644 (file)
@@ -67,3 +67,4 @@ tools-include-adopt-linux-bits.h.patch
 iomap-report-collisions-between-directio-and-buffered-writes-to-userspace.patch
 xfs-add-the-ability-to-join-a-held-buffer-to-a-defer_ops.patch
 xfs-hold-xfs_buf-locked-between-shortform-leaf-conversion-and-the-addition-of-an-attribute.patch
+i2c-hid-properly-terminate-i2c_hid_dmi_desc_override_table-array.patch