lkml.org 
[lkml]   [2006]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Move pci_dev_put outside a spinlock
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@rowland.harvard.edu>

---

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-23 23:15    [W:0.019 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site