Hello, On Thu, 2 Aug 2018 14:23:51 +0000, Vincent Pelletier <plr.vincent@xxxxxxxxx> wrote: > On Thu, 2 Aug 2018 00:45:14 +0000, "He, Bo" <bo.he@xxxxxxxxx> wrote: > > Your patch fix the issue BUG: scheduling while atomic: > > Yes, although from my understanding of Felipe's answer, the actual bug > is the "scheduling" part (sleeping in dwc3 UDC) rather than the > "atomic" part. > > So my patch addresses, still if my understanding is correct, the wrong > half of the problem, and even introduced the regression you identified. > Hence my uncertainty... I notice that neither He's patch, nor a dwc3 change to prevent it from scheduling inside usb_ep_dequeue are in Linus' master. Please correct me if I missed something. Just in case my previous emails were not clear: - I have no objection to He's patch on its own (and I do not know the code nearly enough to provide a meaningful reviewed-by). - I do not intend to work on making changes to dwc3 gadget to stop it from scheduling in usb_ep_dequeue in the foreseeable future. So if there is no ongoing work on dwc3 cancel behaviour (Felipe ?), please do resume/carry on with reviewing and integrating He's patch. It is only *if* dwc3 cancel stops scheduling that I believe my patch should be reverted (here is the hash as of Linus' master): commit d52e4d0c0c428bf2ba35074a7495cdb28e2efbae Author: Vincent Pelletier <plr.vincent@xxxxxxxxx> Date: Wed Jun 13 11:05:06 2018 +0000 usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers This bug happens only when the UDC needs to sleep during usb_ep_dequeue, as is the case for (at least) dwc3. and, in my understanding, a consequence is that He's fix would not be needed anymore - the bug my patch introduced disappearing in the revert. Regards, -- Vincent Pelletier