linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Pelletier <plr.vincent@gmail.com>
To: "He, Bo" <bo.he@intel.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Roger Quadros <rogerq@ti.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Sam Protsenko <semen.protsenko@linaro.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Praneeth Bajjuri <praneeth@ti.com>,
	"Bai, Jie A" <jie.a.bai@intel.com>
Subject: usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers
Date: Tue, 25 Sep 2018 12:46:12 +0000	[thread overview]
Message-ID: <20180925124612.1d7f5ae3@gmail.com> (raw)

Hello,

On Thu, 2 Aug 2018 14:23:51 +0000, Vincent Pelletier
<plr.vincent@gmail.com> wrote:
> On Thu, 2 Aug 2018 00:45:14 +0000, "He, Bo" <bo.he@intel.com> 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@gmail.com>
  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,

             reply	other threads:[~2018-09-25 12:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 12:46 Vincent Pelletier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-17 16:29 usb: gadget: ffs: Fix BUG when userland exits with submitted AIO transfers Evan Green
2019-01-16 23:56 Evan Green
2018-10-23 14:22 Lars-Peter Clausen
2018-10-23 12:20 Lars-Peter Clausen
2018-09-27  2:31 He, Bo
2018-08-02 14:23 Vincent Pelletier
2018-08-02  0:45 He, Bo
2018-08-01 15:03 Vincent Pelletier
2018-06-29  6:32 Felipe Balbi
2018-06-21 15:30 Alan Stern
2018-06-21 11:10 Roger Quadros
2018-06-21 10:52 Lars-Peter Clausen
2018-06-21  8:29 Roger Quadros
2018-06-19 13:20 Sam Protsenko
2018-06-14 13:23 Sam Protsenko
2018-06-13 11:05 Vincent Pelletier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180925124612.1d7f5ae3@gmail.com \
    --to=plr.vincent@gmail.com \
    --cc=bo.he@intel.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=jie.a.bai@intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=praneeth@ti.com \
    --cc=rogerq@ti.com \
    --cc=semen.protsenko@linaro.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).