This is a note to let you know that I've just added the patch titled
xhci: Use GFP_NOIO during device reset.
to the 2.6.36-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-use-gfp_noio-during-device-reset.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From a6d940dd759bf240d28624198660ed34582a327b Mon Sep 17 00:00:00 2001
From: Sarah Sharp <[email protected]>
Date: Tue, 28 Dec 2010 13:08:42 -0800
Subject: xhci: Use GFP_NOIO during device reset.
From: Sarah Sharp <[email protected]>
commit a6d940dd759bf240d28624198660ed34582a327b upstream.
When xhci_discover_or_reset_device() is called after a host controller
power loss, the virtual device may need to be reallocated. Make sure
xhci_alloc_dev() uses GFP_NOIO. This avoid causing a deadlock by allowing
the kernel to flush pending I/O while reallocating memory for a virtual
device for a USB mass storage device that's holding the backing store for
dirty memory buffers.
This patch should be queued for the 2.6.37 stable tree.
Signed-off-by: Sarah Sharp <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/host/xhci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -2168,8 +2168,12 @@ int xhci_alloc_dev(struct usb_hcd *hcd,
xhci_err(xhci, "Error while assigning device slot ID\n");
return 0;
}
- /* xhci_alloc_virt_device() does not touch rings; no need to lock */
- if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_KERNEL)) {
+ /* xhci_alloc_virt_device() does not touch rings; no need to lock.
+ * Use GFP_NOIO, since this function can be called from
+ * xhci_discover_or_reset_device(), which may be called as part of
+ * mass storage driver error handling.
+ */
+ if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_NOIO)) {
/* Disable slot, if we can do it without mem alloc */
xhci_warn(xhci, "Could not allocate xHCI USB device data
structures\n");
spin_lock_irqsave(&xhci->lock, flags);
Patches currently in stable-queue which might be from
[email protected] are
queue-2.6.36/xhci-use-gfp_noio-during-device-reset.patch
queue-2.6.36/usb-realloc-xhci-structures-after-a-hub-is-verified.patch
queue-2.6.36/xhci-do-not-run-xhci_cleanup_msix-with-irq-disabled.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable