Re: [PATCH] usb: usbfs: Fix deadlock of khubd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 6 Mar 2010, Dmitry Torokhov wrote:

> OK, the patch below unwedges vmware-usb-arbitrator that tries to access
> /proc/bus/input/devices (it doers what input core does now), however
> khubd is still wedged with the following lockdep output:

I admit, I don't understand exactly what's going wrong here.  Maybe 
you're experiencing the same bug that Oliver was trying to fix, in a 
slightly different form.  The order of locking should always be: 
usbfs_mutex first, usb_notifier_list.rwsem second.  I can't tell from 
the lockdep output how the reversal occurred.

Regardless, it seems the best thing to do is take Linus's advice.  
Remove all uses of usbfs_mutex from devices.c and make conndiscevcnt an
atomic_t so that it can be incremented without locking.

And while you're at it, please also follow Linus's implied suggestion
and change that stupid variable name.  Generations of code readers to
come will thank you.

Alan Stern

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux