On Fri, 30 Apr 2004 23:09:31 -0400 (EDT) Alan Stern <[EMAIL PROTECTED]> wrote:
> It may be that we're making ->serialize do too much. For example, my > recent change to devices.c uses it to prevent topology changes while > traversing the tree, but that function could easily be served by something > else, like a bus-specific topology semaphore. This would specifically be > intended to protect the children[] arrays and nothing else. (Your > flattened list, too, if that is adopted.) Locking rule: Always lock > usbdev->serialize _before_ locking usbdev->bus->topology_sem. Alan is right here, this is how my attempts to reuse dev->serialize floundered in 2.4 just today. The dev->serialize covers a lot and sits in a very unfortunate path, so it's an exception. However my general rule is to merge locks as much as possible, as a universal cure for ordering problems. -- Pete ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel