From: <gregkh@linuxfoundation.org>
To: d.eccher@gmail.com, balbi@ti.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write" has been added to the 3.18-stable tree
Date: Mon, 09 Oct 2017 13:19:52 +0200 [thread overview]
Message-ID: <150754799283178@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write
to the 3.18-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-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch
and it can be found in the queue-3.18 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 b7bd98b7db9fc8fe19da1a5ff0215311c6b95e46 Mon Sep 17 00:00:00 2001
From: David Eccher <d.eccher@gmail.com>
Date: Fri, 11 Dec 2015 22:13:55 +0100
Subject: usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write
From: David Eccher <d.eccher@gmail.com>
commit b7bd98b7db9fc8fe19da1a5ff0215311c6b95e46 upstream.
Fix bad unlock balance: ep0_write enter with the locks locked from
inode.c:1769, hence it must exit with spinlock held to avoid double
unlock in dev_config.
Signed-off-by: David Eccher <d.eccher@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/gadget/legacy/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c
@@ -1224,10 +1224,9 @@ ep0_write (struct file *fd, const char _
dev->gadget->ep0, dev->req,
GFP_KERNEL);
}
+ spin_lock_irq(&dev->lock);
if (retval < 0) {
- spin_lock_irq (&dev->lock);
clean_req (dev->gadget->ep0, dev->req);
- spin_unlock_irq (&dev->lock);
} else
retval = len;
Patches currently in stable-queue which might be from d.eccher@gmail.com are
queue-3.18/usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch
reply other threads:[~2017-10-09 11:19 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=150754799283178@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=balbi@ti.com \
--cc=d.eccher@gmail.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.