From: yuanlinyu <yuanlinyu@hihonor.com>
To: Oliver Neukum <oneukum@suse.com>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH v1] usb: f_mass_storage: reduce chance to queue disable ep
Date: Thu, 14 Mar 2024 09:20:25 +0000 [thread overview]
Message-ID: <fd1200d4a72840acbb09e1d91ccd30c4@hihonor.com> (raw)
In-Reply-To: <ee024edfcb4447fb884878b15fe202f0@hihonor.com>
> From: yuanlinyu
> Sent: Thursday, March 14, 2024 4:14 PM
> To: 'Oliver Neukum' <oneukum@suse.com>; Alan Stern
> <stern@rowland.harvard.edu>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org; stable@vger.kernel.org
> Subject: RE: [PATCH v1] usb: f_mass_storage: reduce chance to queue disable ep
>
> > From: Oliver Neukum <oneukum@suse.com>
> > Sent: Thursday, March 14, 2024 3:54 PM
> >
> >
> > Sorry, now for the longer explanation. You'd introduce a deadlock.
> > You just cannot sleep with a spinlock held. It seems to me that
>
> I didn't review usb_ep_queue() clearly, in my test, I didn't hit sleep.
> But the concern is good, will find better way to avoid it.
Oliver, could you share one example which can sleep ?
I check several UDC drivers, like dwc3, cdnsp, cdns3,
Both disable/queue function have spinlock, this means no sleep, right ?
>
> > if you want to do this cleanly, you need to revisit the locking
> > to use locks you can sleep under.
> >
> > HTH
> > Oliver
next prev parent reply other threads:[~2024-03-14 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 6:59 [PATCH v1] usb: f_mass_storage: reduce chance to queue disable ep yuan linyu
2024-03-14 7:53 ` Oliver Neukum
2024-03-14 8:14 ` yuanlinyu
2024-03-14 9:20 ` yuanlinyu [this message]
2024-03-14 15:02 ` Alan Stern
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=fd1200d4a72840acbb09e1d91ccd30c4@hihonor.com \
--to=yuanlinyu@hihonor.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=stable@vger.kernel.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