possible deadlock in 3b6054da68f9b0d5ed6a7ed0f42a79e61904352c ("usb hub: send clear_tt_buffer_complete events when canceling TT clear work")
Hi,
looking at this code, which fixed a deadlock,it looks to me like it has introduced another deadlock.
[assume a storage device on a hub being suspended]
hub_suspend() -> hub_quiesce() -> flush_work(&hub->tt.clear_work) ->
/* note that tt.clear_work is not on its own queue, it uses simple schedule_work(). Hence the work lands on system_wq, shared with arbitrary works */
kmalloc(... , GFP_KERNEL) -> usb_storage or uas -> usb_autopm_get_interface() -> DEADLOCK
I think you need to use a dedicated workqueue for the hub driver.
Regards
Oliver