From: <gregkh@linuxfoundation.org>
To: mina86@mina86.com, chenyu56@huawei.com,
felipe.balbi@linux.intel.com, gregkh@linuxfoundation.org,
john.stultz@linaro.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "usb: gadget: f_fs: edit epfile->ep under lock" has been added to the 4.8-stable tree
Date: Sat, 19 Nov 2016 09:58:35 +0100 [thread overview]
Message-ID: <14795459153792@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
usb: gadget: f_fs: edit epfile->ep under lock
to the 4.8-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-gadget-f_fs-edit-epfile-ep-under-lock.patch
and it can be found in the queue-4.8 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 454915dde06a51133750c6745f0ba57361ba209d Mon Sep 17 00:00:00 2001
From: Michal Nazarewicz <mina86@mina86.com>
Date: Tue, 4 Oct 2016 02:07:33 +0200
Subject: usb: gadget: f_fs: edit epfile->ep under lock
From: Michal Nazarewicz <mina86@mina86.com>
commit 454915dde06a51133750c6745f0ba57361ba209d upstream.
epfile->ep is protected by ffs->eps_lock (not epfile->mutex) so clear it
while holding the spin lock.
Tested-by: John Stultz <john.stultz@linaro.org>
Tested-by: Chen Yu <chenyu56@huawei.com>
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/gadget/function/f_fs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1722,17 +1722,17 @@ static void ffs_func_eps_disable(struct
unsigned long flags;
do {
- if (epfile)
- mutex_lock(&epfile->mutex);
spin_lock_irqsave(&func->ffs->eps_lock, flags);
/* pending requests get nuked */
if (likely(ep->ep))
usb_ep_disable(ep->ep);
++ep;
+ if (epfile)
+ epfile->ep = NULL;
spin_unlock_irqrestore(&func->ffs->eps_lock, flags);
if (epfile) {
- epfile->ep = NULL;
+ mutex_lock(&epfile->mutex);
kfree(epfile->read_buffer);
epfile->read_buffer = NULL;
mutex_unlock(&epfile->mutex);
Patches currently in stable-queue which might be from mina86@mina86.com are
queue-4.8/usb-gadget-f_fs-edit-epfile-ep-under-lock.patch
queue-4.8/usb-gadget-f_fs-stop-sleeping-in-ffs_func_eps_disable.patch
reply other threads:[~2016-11-19 8:58 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=14795459153792@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=chenyu56@huawei.com \
--cc=felipe.balbi@linux.intel.com \
--cc=john.stultz@linaro.org \
--cc=mina86@mina86.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.