Hi Felipe,

On  5.03.2019 12:10, Radoslav Gerganov wrote:
> In f_hidg_write() the write_spinlock is acquired before calling
> usb_ep_queue() which causes a deadlock when dummy_hcd is being used.
> This is because dummy_queue() callbacks into f_hidg_req_complete() which
> tries to acquire the same spinlock. This is (part of) the backtrace when
> the deadlock occurs:
> 
>   0xffffffffc06b1410 in f_hidg_req_complete
>   0xffffffffc06a590a in usb_gadget_giveback_request
>   0xffffffffc06cfff2 in dummy_queue
>   0xffffffffc06a4b96 in usb_ep_queue
>   0xffffffffc06b1eb6 in f_hidg_write
>   0xffffffff8127730b in __vfs_write
>   0xffffffff812774d1 in vfs_write
>   0xffffffff81277725 in SYSC_write
> 
> Fix this by releasing the write_spinlock before calling usb_ep_queue()
> 
> Signed-off-by: Radoslav Gerganov <[email protected]>

Did you have a chance to look at this patch?  Please let me know if you
need concrete steps for reproducing the deadlock.

Thanks,
Rado

Reply via email to