From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:35664 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbeBWJwZ (ORCPT ); Fri, 23 Feb 2018 04:52:25 -0500 Subject: Patch "xhci: xhci debugfs device nodes weren't removed after device plugged out" has been added to the 4.15-stable tree To: zhengjun.xing@linux.intel.com, gregkh@linuxfoundation.org, mathias.nyman@linux.intel.com, stable@vger.kernel.org Cc: , From: Date: Fri, 23 Feb 2018 10:52:03 +0100 Message-ID: <1519379523137162@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 xhci: xhci debugfs device nodes weren't removed after device plugged out to the 4.15-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: xhci-xhci-debugfs-device-nodes-weren-t-removed-after-device-plugged-out.patch and it can be found in the queue-4.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 8c5a93ebf7ac56d47f879b3c7c2f8c83b40c2cdb Mon Sep 17 00:00:00 2001 From: Zhengjun Xing Date: Mon, 12 Feb 2018 14:24:50 +0200 Subject: xhci: xhci debugfs device nodes weren't removed after device plugged out From: Zhengjun Xing commit 8c5a93ebf7ac56d47f879b3c7c2f8c83b40c2cdb upstream. There is a bug after plugged out USB device, the device and its ep00 nodes are still kept, we need to remove the nodes in xhci_free_dev when USB device is plugged out. Fixes: 052f71e25a7e ("xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate") Cc: # v4.15 Signed-off-by: Zhengjun Xing Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -3552,12 +3552,10 @@ static void xhci_free_dev(struct usb_hcd virt_dev->eps[i].ep_state &= ~EP_STOP_CMD_PENDING; del_timer_sync(&virt_dev->eps[i].stop_cmd_timer); } - + xhci_debugfs_remove_slot(xhci, udev->slot_id); ret = xhci_disable_slot(xhci, udev->slot_id); - if (ret) { - xhci_debugfs_remove_slot(xhci, udev->slot_id); + if (ret) xhci_free_virt_device(xhci, udev->slot_id); - } } int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id) Patches currently in stable-queue which might be from zhengjun.xing@linux.intel.com are queue-4.15/xhci-fix-xhci-debugfs-devices-node-disappearance-after-hibernation.patch queue-4.15/xhci-fix-xhci-debugfs-errors-in-xhci_stop.patch queue-4.15/xhci-xhci-debugfs-device-nodes-weren-t-removed-after-device-plugged-out.patch queue-4.15/xhci-fix-null-pointer-in-xhci-debugfs.patch