From: Felipe Balbi <balbi@kernel.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH v2] usb: gadget: function: printer: avoid wrong list handling in printer_write()
Date: Mon, 21 May 2018 15:24:06 +0300 [thread overview]
Message-ID: <87tvr16vtl.fsf@linux.intel.com> (raw)
In-Reply-To: <1526901487-22438-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
Hi Greg,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> writes:
> When printer_write() calls usb_ep_queue(), a udc driver (e.g.
> renesas_usbhs driver) may call usb_gadget_giveback_request() in
> the udc .queue ops immediately. Then, printer_write() calls
> list_add(&req->list, &dev->tx_reqs_active) wrongly. After that,
> if we do unbind the printer driver, WARN_ON() happens in
> printer_func_unbind() because the list entry is not removed.
>
> So, this patch moves list_add(&req->list, &dev->tx_reqs_active)
> calling before usb_ep_queue().
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
I'm not sure if you're still taking bug fixes for current -rc cycle, but
if you are, please take this directly. If you're done with v4.17, please
apply this on top of my pull request which I sent an hour or so ago.
Thanks
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2018-05-21 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 11:18 [PATCH v2] usb: gadget: function: printer: avoid wrong list handling in printer_write() Yoshihiro Shimoda
2018-05-21 12:24 ` Felipe Balbi [this message]
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=87tvr16vtl.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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