From: <gregkh@linuxfoundation.org>
To: felipe.balbi@linux.intel.com, gregkh@linuxfoundation.org,
januszx.dziedzic@linux.intel.com, stable@vger.kernel.org,
tomaszx.medrek@intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "usb: dwc3: gadget: always unmap EP0 requests" has been added to the 4.9-stable tree
Date: Mon, 09 Jan 2017 12:28:19 +0100 [thread overview]
Message-ID: <148396129916833@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
usb: dwc3: gadget: always unmap EP0 requests
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-dwc3-gadget-always-unmap-ep0-requests.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From d62145929992f331fdde924d5963ab49588ccc7d Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@linux.intel.com>
Date: Tue, 20 Dec 2016 14:14:40 +0200
Subject: usb: dwc3: gadget: always unmap EP0 requests
From: Felipe Balbi <felipe.balbi@linux.intel.com>
commit d62145929992f331fdde924d5963ab49588ccc7d upstream.
commit 0416e494ce7d ("usb: dwc3: ep0: correct cache
sync issue in case of ep0_bounced") introduced a bug
where we would leak DMA resources which would cause
us to starve the system of them resulting in failing
DMA transfers.
Fix the bug by making sure that we always unmap EP0
requests since those are *always* mapped.
Fixes: 0416e494ce7d ("usb: dwc3: ep0: correct cache
sync issue in case of ep0_bounced")
Cc: <stable@vger.kernel.org>
Tested-by: Tomasz Medrek <tomaszx.medrek@intel.com>
Reported-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/gadget.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -182,11 +182,11 @@ void dwc3_gadget_giveback(struct dwc3_ep
if (req->request.status == -EINPROGRESS)
req->request.status = status;
- if (dwc->ep0_bounced && dep->number == 0)
+ if (dwc->ep0_bounced && dep->number <= 1)
dwc->ep0_bounced = false;
- else
- usb_gadget_unmap_request(&dwc->gadget, &req->request,
- req->direction);
+
+ usb_gadget_unmap_request(&dwc->gadget, &req->request,
+ req->direction);
trace_dwc3_gadget_giveback(req);
Patches currently in stable-queue which might be from felipe.balbi@linux.intel.com are
queue-4.9/usb-gadget-fix-request-length-error-for-isoc-transfer.patch
queue-4.9/usb-dummy-hcd-fix-bug-in-stop_activity-handle-ep0.patch
queue-4.9/usb-dwc3-core-avoid-overflow-events.patch
queue-4.9/usb-gadgetfs-fix-use-after-free-bug.patch
queue-4.9/usb-dwc3-pci-fix-dr_mode-misspelling.patch
queue-4.9/usb-gadget-composite-test-get_alt-presence-instead-of-set_alt.patch
queue-4.9/usb-dwc3-ep0-explicitly-call-dwc3_ep0_prepare_one_trb.patch
queue-4.9/usb-phy-am335x-control-fix-device-and-of_node-leaks.patch
queue-4.9/usb-gadgetfs-restrict-upper-bound-on-device-configuration-size.patch
queue-4.9/usb-gadget-udc-core-fix-return-code-of-usb_gadget_probe_driver.patch
queue-4.9/usb-gadget-fix-second-argument-of-percpu_ida_alloc.patch
queue-4.9/usb-gadgetfs-fix-checks-of-wtotallength-in-config-descriptors.patch
queue-4.9/usb-dwc3-gadget-always-unmap-ep0-requests.patch
queue-4.9/usb-dwc3-ep0-add-dwc3_ep0_prepare_one_trb.patch
queue-4.9/usb-dwc3-gadget-fix-full-speed-mode.patch
queue-4.9/usb-dwc3-pci-add-intel-gemini-lake-pci-id.patch
queue-4.9/usb-gadgetfs-fix-unbounded-memory-allocation-bug.patch
reply other threads:[~2017-01-09 11:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=148396129916833@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=felipe.balbi@linux.intel.com \
--cc=januszx.dziedzic@linux.intel.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomaszx.medrek@intel.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;
as well as URLs for NNTP newsgroup(s).