From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH 4.13 19/28] platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface
Date: Sun, 19 Nov 2017 15:44:06 +0100 [thread overview]
Message-ID: <20171119144312.555498389@linuxfoundation.org> (raw)
In-Reply-To: <20171119144311.441716251@linuxfoundation.org>
4.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit 3b95206110a2c13076c3a7fa8ddeae36c2dbcf42 upstream.
It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not
as unique as a GUID should be and is used on some other devices too.
This is causing spurious key-press reports on these other devices.
This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to
ensure that it is actually running on a PEAQ 2-in-1, fixing the
spurious key-presses on these other devices.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1497861
BugLink: https://bugzilla.suse.com/attachment.cgi?id=743182
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
--- a/drivers/platform/x86/peaq-wmi.c
+++ b/drivers/platform/x86/peaq-wmi.c
@@ -8,6 +8,7 @@
*/
#include <linux/acpi.h>
+#include <linux/dmi.h>
#include <linux/input-polldev.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -64,8 +65,22 @@ static void peaq_wmi_poll(struct input_p
}
}
+/* Some other devices (Shuttle XS35) use the same WMI GUID for other purposes */
+static const struct dmi_system_id peaq_dmi_table[] = {
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PEAQ"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PEAQ PMM C1010 MD99187"),
+ },
+ },
+};
+
static int __init peaq_wmi_init(void)
{
+ /* WMI GUID is not unique, also check for a DMI match */
+ if (!dmi_check_system(peaq_dmi_table))
+ return -ENODEV;
+
if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID))
return -ENODEV;
@@ -86,6 +101,9 @@ static int __init peaq_wmi_init(void)
static void __exit peaq_wmi_exit(void)
{
+ if (!dmi_check_system(peaq_dmi_table))
+ return;
+
if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID))
return;
next prev parent reply other threads:[~2017-11-19 14:49 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 14:43 [PATCH 4.13 00/28] 4.13.15-stable review Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 01/28] media: imon: Fix null-ptr-deref in imon_probe Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 02/28] media: dib0700: fix invalid dvb_detach argument Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 03/28] Bluetooth: btusb: fix QCA Rome suspend/resume Greg Kroah-Hartman
2017-12-16 3:05 ` Matthias Kaehlcke
2017-12-18 5:16 ` Kai Heng Feng
2017-12-18 11:43 ` Greg Kroah-Hartman
2017-12-18 18:13 ` Brian Norris
2017-12-19 4:28 ` Kai Heng Feng
2017-12-19 23:11 ` Brian Norris
2017-12-20 8:42 ` Kai Heng Feng
2017-11-19 14:43 ` [PATCH 4.13 04/28] crypto: dh - Fix double free of ctx->p Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 05/28] crypto: dh - Dont permit p to be 0 Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 06/28] crypto: dh - Dont permit key or g size longer than p Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 07/28] crypto: brcm - Explicity ACK mailbox message Greg Kroah-Hartman
2017-11-21 7:51 ` Greg Kroah-Hartman
2017-11-21 10:05 ` Raveendra Padasalagi
2017-11-19 14:43 ` [PATCH 4.13 08/28] USB: early: Use new USB product ID and strings for DbC device Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 09/28] USB: usbfs: compute urb->actual_length for isochronous Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 10/28] USB: Add delay-init quirk for Corsair K70 LUX keyboards Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 11/28] usb: gadget: f_fs: Fix use-after-free in ffs_free_inst Greg Kroah-Hartman
2017-11-19 14:43 ` [PATCH 4.13 12/28] USB: serial: metro-usb: stop I/O after failed open Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 13/28] USB: serial: Change DbC debug device binding ID Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 14/28] USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 15/28] USB: serial: garmin_gps: fix I/O after failed probe and remove Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 16/28] USB: serial: garmin_gps: fix memory leak on probe errors Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 17/28] selftests/x86/protection_keys: Fix syscall NR redefinition warnings Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 18/28] x86/MCE/AMD: Always give panic severity for UC errors in kernel context Greg Kroah-Hartman
2017-11-19 14:44 ` Greg Kroah-Hartman [this message]
2017-11-19 14:44 ` [PATCH 4.13 20/28] platform/x86: peaq_wmi: Fix missing terminating entry for peaq_dmi_table Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 22/28] HID: wacom: generic: Recognize WACOM_HID_WD_PEN as a type of pen collection Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 23/28] staging: wilc1000: Fix bssid buffer offset in Txq Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 24/28] staging: sm750fb: Fix parameter mistake in poke32 Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 25/28] staging: ccree: fix 64 bit scatter/gather DMA ops Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 26/28] staging: greybus: spilib: fix use-after-free after deregistration Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 27/28] staging: vboxvideo: Fix reporting invalid suggested-offset-properties Greg Kroah-Hartman
2017-11-19 14:44 ` [PATCH 4.13 28/28] staging: rtl8188eu: Revert 4 commits breaking ARP Greg Kroah-Hartman
2017-11-19 20:13 ` [PATCH 4.13 00/28] 4.13.15-stable review Guenter Roeck
2017-11-20 14:13 ` Guenter Roeck
2017-11-21 7:23 ` Greg Kroah-Hartman
2017-11-21 7:51 ` Greg Kroah-Hartman
2017-11-21 10:06 ` Guenter Roeck
2017-11-21 14:15 ` Greg Kroah-Hartman
2017-11-20 21:18 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171119144312.555498389@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).