[PATCH] Move pci_dev_put outside a spinlock

From: Alan Stern
Date: Thu Feb 23 2006 - 17:10:43 EST


Greg:

This patch (as659) fixes a might_sleep problem in the PCI core, by moving
a call to pci_dev_put() outside the scope of a spinlock.

Alan Stern



Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

---

Maybe this has already been fixed; if so the fix isn't in your
development tree for 2.6.16-rc4.

Index: usb-2.6/drivers/pci/search.c
===================================================================
--- usb-2.6.orig/drivers/pci/search.c
+++ usb-2.6/drivers/pci/search.c
@@ -246,9 +246,9 @@ pci_get_subsys(unsigned int vendor, unsi
}
dev = NULL;
exit:
- pci_dev_put(from);
dev = pci_dev_get(dev);
spin_unlock(&pci_bus_lock);
+ pci_dev_put(from);
return dev;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/