Good work!
There isn't any way to see the lock holder except by adding more
printk's. Fortunately that lock is private to hcd.c, so you know it's
not used anywhere else. And it's not used in very many places in that
file, so you can add printk's around each one. While you're at it, you
ought to enable CONFIG_USB_DEBUG so that more of the context will be
visible in the log.
The usage in usb_hcd_link_urb_to_ep() appears benign; the code doesn't
do anything that might hang while holding the lock. All it does is
manipulate a linked list.
You have already instrumented the usage in
usb_hcd_unlink_urb_from_ep().
That leaves only usb_hcd_flush_endpoint(). And once again, the code
isn't doing anything while holding the lock except following
linked-list pointers.
Taken together, these facts suggest that somehow the linked list has
been corrupted. So you might also want to add some printk's around the
linked-list activities in flush_endpoint, just to see if the pointer
values look reasonable.
Alan Stern
--