[3.16.y-ckt stable] Patch "usb: xhci: Allow usb_add/remove_hcd() to be called repeatedly" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Oct 19 14:21:07 UTC 2015
This is a note to let you know that I have just added a patch titled
usb: xhci: Allow usb_add/remove_hcd() to be called repeatedly
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt19.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 2dfc349552736ebd5f5cd59058a3e7a98191988e Mon Sep 17 00:00:00 2001
From: Roger Quadros <rogerq at ti.com>
Date: Fri, 29 May 2015 17:01:48 +0300
Subject: usb: xhci: Allow usb_add/remove_hcd() to be called repeatedly
commit 8a853759c262fd52ff0f5e89f89c65928077fe4a upstream.
Don't set xhci->shared_hcd to NULL in xhci_stop() as we have
still not de-allocated it. It was resulting in a NULL pointer
de-reference if usb_add/remove_hcd() is called repeatedly.
We want repeated add/remove to work for the OTG use case.
Signed-off-by: Roger Quadros <rogerq at ti.com>
Signed-off-by: Mathias Nyman <mathias.nyman at linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/usb/host/xhci.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 4170d913ee6e..d7f3adf56af2 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -663,12 +663,6 @@ static void xhci_only_stop_hcd(struct usb_hcd *hcd)
spin_lock_irq(&xhci->lock);
xhci_halt(xhci);
-
- /* The shared_hcd is going to be deallocated shortly (the USB core only
- * calls this function when allocation fails in usb_add_hcd(), or
- * usb_remove_hcd() is called). So we need to unset xHCI's pointer.
- */
- xhci->shared_hcd = NULL;
spin_unlock_irq(&xhci->lock);
}
More information about the kernel-team
mailing list