On Fri, 24 Nov 2017 16:45:53 +0200, Felipe Balbi <[email protected]>
wrote:
> no, it's not. This is because of our call to wait_event_lock_irq() in
> dwc3_gadget_ep_dequeue(). That call works fine in all other cases
> because dequeue is never called with IRQs disabled, apart from this one
> case in f_fs.c :-)
> 
> Can you confirm that this helps:
> 
> modified   drivers/usb/gadget/function/f_fs.c
> @@ -1077,15 +1077,11 @@ static int ffs_aio_cancel(struct kiocb *kiocb)
>  
>       ENTER();
>  
> -     spin_lock_irq(&epfile->ffs->eps_lock);
> -
>       if (likely(io_data && io_data->ep && io_data->req))
>               value = usb_ep_dequeue(io_data->ep, io_data->req);
>       else
>               value = -EINVAL;
>  
> -     spin_unlock_irq(&epfile->ffs->eps_lock);
> -
>       return value;
>  }
>  

It sadly does not help, though it does something: now serial output
stops early (tried twice, happened twice):

[  103.274725] BUG: scheduling while atomic: swapper/1/0/0x00000100
[  103.280990] 3 locks held by swapper/1/0:
[  103.280998]  #0:  (rcu_callback){....}, at: [<c10b4ff0>] 
rcu_process_callbacks+0x260/0x440
[  103.281053]  #1:  (rcu_read_lock_sched){....}, at: [<c1358ba0>] 
percpu_ref_switch_to_atomic_rcu+0xb0/0x130
[  103.281097]  #2:  (&(&ctx->ctx_lock)->rlock){....}, at: [<c11f0c73>] 
free_ioctx_us

So I do not get dropped to kdb...
-- 
Vincent Pelletier
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to