From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:52283 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932284AbcIBOXw (ORCPT ); Fri, 2 Sep 2016 10:23:52 -0400 Subject: Patch "xhci: don't dereference a xhci member after removing xhci" has been added to the 4.4-stable tree To: mathias.nyman@linux.intel.com, gregkh@linuxfoundation.org Cc: , From: Date: Fri, 02 Sep 2016 16:23:33 +0200 Message-ID: <1472826213247198@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: don't dereference a xhci member after removing xhci to the 4.4-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-don-t-dereference-a-xhci-member-after-removing-xhci.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From f1f6d9a8b540df22b87a5bf6bc104edaade81f47 Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Tue, 16 Aug 2016 10:18:06 +0300 Subject: xhci: don't dereference a xhci member after removing xhci From: Mathias Nyman commit f1f6d9a8b540df22b87a5bf6bc104edaade81f47 upstream. Remove the hcd after checking for the xhci last quirks, not before. This caused a hang on a Alpine Ridge xhci based maching which remove the whole xhci controller when unplugging the last usb device Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -311,11 +311,12 @@ static void xhci_pci_remove(struct pci_d usb_remove_hcd(xhci->shared_hcd); usb_put_hcd(xhci->shared_hcd); } - usb_hcd_pci_remove(dev); /* Workaround for spurious wakeups at shutdown with HSW */ if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) pci_set_power_state(dev, PCI_D3hot); + + usb_hcd_pci_remove(dev); } #ifdef CONFIG_PM Patches currently in stable-queue which might be from mathias.nyman@linux.intel.com are queue-4.4/xhci-don-t-dereference-a-xhci-member-after-removing-xhci.patch queue-4.4/usb-xhci-fix-panic-if-disconnect.patch queue-4.4/usb-define-usb_speed_super_plus-speed-for-superspeedplus-usb3.1-devices.patch queue-4.4/xhci-always-handle-command-ring-stopped-events.patch