* Patch "usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write" has been added to the 4.4-stable tree
@ 2017-10-09 9:59 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-09 9:59 UTC (permalink / raw)
To: d.eccher, balbi, gregkh; +Cc: stable, stable-commits
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 4.4-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-4.4 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
@@ -1140,10 +1140,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-4.4/usb-gadget-inode.c-fix-unbalanced-spin_lock-in-ep0_write.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-09 9:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 9:59 Patch "usb: gadget: inode.c: fix unbalanced spin_lock in ep0_write" has been added to the 4.4-stable tree gregkh
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).