Patch "HID: wacom: release the resources before leaving despite devm" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
HID: wacom: release the resources before leaving despite devm
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-release-the-resources-before-leaving-despite-devm.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 foo@baz Thu Oct 5 10:28:31 CEST 2017
From: Benjamin Tissoires <[email protected]>
Date: Fri, 20 Jan 2017 16:20:11 +0100
Subject: HID: wacom: release the resources before leaving despite devm
From: Benjamin Tissoires <[email protected]>
[ Upstream commit 5b779fc52020ac6f5beea31c5eafc3d25cf70dc1 ]
In the general case, the resources are properly released by devm without needing to do anything. However, when unplugging the wireless receiver, the kernel segfaults from time to time while calling devres_release_all().
I think in that case the resources attempt to access hid_get_drvdata(hdev) which has been set to null while leaving wacom_remove().
--- drivers/hid/wacom_sys.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hid/wacom_sys.c +2 -0
@@ -2433,6 +2433,8 @@ static void wacom_remove(struct hid_deviif (hdev->bus ==BUS_BLUETOOTH )device_remove_file (&hdev->dev, &dev_attr_speed); +wacom_release_resources (wacom); +hid_set_drvdata (hdev,NULL ); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/hid-wacom-release-the-resources-before-leaving-despite-devm.patch