From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38178 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbdJEIbE (ORCPT ); Thu, 5 Oct 2017 04:31:04 -0400 Subject: Patch "HID: wacom: release the resources before leaving despite devm" has been added to the 4.9-stable tree To: benjamin.tissoires@redhat.com, alexander.levin@verizon.com, gregkh@linuxfoundation.org, jason.gerecke@wacom.com, jkosina@suse.cz Cc: , From: Date: Thu, 05 Oct 2017 10:30:13 +0200 Message-ID: <150719221324158@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From foo@baz Thu Oct 5 10:28:31 CEST 2017 From: Benjamin Tissoires Date: Fri, 20 Jan 2017 16:20:11 +0100 Subject: HID: wacom: release the resources before leaving despite devm From: Benjamin Tissoires [ 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(). Signed-off-by: Benjamin Tissoires Acked-by: Jason Gerecke Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/hid/wacom_sys.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -2433,6 +2433,8 @@ static void wacom_remove(struct hid_devi if (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 benjamin.tissoires@redhat.com are queue-4.9/hid-wacom-release-the-resources-before-leaving-despite-devm.patch