BUG: Deadlock caused by bandwidth_mutex

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

 



Sarah:

I just tracked this down.  When you do

	echo 0 >/sys/.../bConfigurationValue

for a hub that has children, usb_disconnect() deadlocks when it tries
to acquire the bandwidth_mutex.  This is because the task already holds
the mutex -- it was acquired in usb_set_configuration() just before the
call to usb_disable_device().

That is, usb_disable_device() unbinds the hub driver, since its 
interface is going away.  The hub driver, in hub_quiesce(), disconnects 
all the child devices.

Any ideas on how to fix this?  Maybe usb_disable_device() should be 
responsible for acquiring the bandwidth_mutex on its own, after it 
unbinds the interfaces, instead of making the caller acquire the mutex.

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