Skip to contentSkip to conversation

Patch "HID: wacom: Don't add ghost interface as shared data" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

HID: wacom: Don't add ghost interface as shared data

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
hid-wacom-don-t-add-ghost-interface-as-shared-data.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 8b4073596997f2ccbf68d8e72e07b827388a4536 Mon Sep 17 00:00:00 2001

From: Aaron Armstrong Skomra <[email protected]>
Date: Wed, 29 Mar 2017 10:35:39 -0700
Subject: HID: wacom: Don't add ghost interface as shared data

From: Aaron Armstrong Skomra <[email protected]>

commit 8b4073596997f2ccbf68d8e72e07b827388a4536 upstream.

A previous commit (below) adds a check for already probed interfaces to Wacom's matching heuristic. Unfortunately this causes the Bamboo Pen (CTL-460) to match itself to its 'ghost' touch interface. After subsequent changes to the driver this match to the ghost causes the kernel to crash. This patch avoids calling wacom_add_shared_data() for the BAMBOO_PEN's ghost touch interface.

Fixes 41372d5d40e7 ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC")
---
 drivers/hid/wacom_sys.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/hid/wacom_sys.c +8 -8
@@ -2017,6 +2017,14 @@ static int wacom_parse_and_register(stru
 
 	wacom_update_name(wacom, wireless ? " (WL)" : "");
 
+	/* pen only Bamboo neither support touch nor pad */
+	if ((features->type == BAMBOO_PEN) &&
+	    ((features->device_type & WACOM_DEVICETYPE_TOUCH) ||
+	    (features->device_type & WACOM_DEVICETYPE_PAD))) {
+		error = -ENODEV;
+		goto fail;
+	}
+
 	error = wacom_add_shared_data(hdev);
 	if (error)
 		goto fail;
@@ -2063,14 +2071,6 @@ static int wacom_parse_and_register(stru
 		error = -ENODEV;
 		goto fail_quirks;
 	}
-
-	/* pen only Bamboo neither support touch nor pad */
-	if ((features->type == BAMBOO_PEN) &&
-	    ((features->device_type & WACOM_DEVICETYPE_TOUCH) ||
-	    (features->device_type & WACOM_DEVICETYPE_PAD))) {
-		error = -ENODEV;
-		goto fail_quirks;
-	}
 
 	if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
 		error = hid_hw_open(hdev);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/hid-wacom-don-t-add-ghost-interface-as-shared-data.patch