All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "usb: gadget: udc: renesas_usb3: fix deadlock by spinlock" has been added to the 4.11-stable tree
@ 2017-06-18  1:03 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-18  1:03 UTC (permalink / raw)
  To: yoshihiro.shimoda.uh, felipe.balbi, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    usb: gadget: udc: renesas_usb3: fix deadlock by spinlock

to the 4.11-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-udc-renesas_usb3-fix-deadlock-by-spinlock.patch
and it can be found in the queue-4.11 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 067d6fdc558d2c43f0bfdc7af99630dd5eb08dc5 Mon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Wed, 26 Apr 2017 20:50:08 +0900
Subject: usb: gadget: udc: renesas_usb3: fix deadlock by spinlock

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

commit 067d6fdc558d2c43f0bfdc7af99630dd5eb08dc5 upstream.

This patch fixes an issue that this driver is possible to cause
deadlock by double-spinclocked in renesas_usb3_stop_controller().
So, this patch removes spinlock API calling in renesas_usb3_stop().
(In other words, the previous code had a redundant lock.)

Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/udc/renesas_usb3.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -1718,14 +1718,11 @@ static int renesas_usb3_start(struct usb
 static int renesas_usb3_stop(struct usb_gadget *gadget)
 {
 	struct renesas_usb3 *usb3 = gadget_to_renesas_usb3(gadget);
-	unsigned long flags;
 
-	spin_lock_irqsave(&usb3->lock, flags);
 	usb3->softconnect = false;
 	usb3->gadget.speed = USB_SPEED_UNKNOWN;
 	usb3->driver = NULL;
 	renesas_usb3_stop_controller(usb3);
-	spin_unlock_irqrestore(&usb3->lock, flags);
 
 	pm_runtime_put(usb3_to_dev(usb3));
 	pm_runtime_disable(usb3_to_dev(usb3));


Patches currently in stable-queue which might be from yoshihiro.shimoda.uh@renesas.com are

queue-4.11/usb-gadget-udc-renesas_usb3-fix-deadlock-by-spinlock.patch
queue-4.11/phy-rcar-gen3-usb2-fix-implementation-for-runtime-pm.patch
queue-4.11/usb-gadget-udc-renesas_usb3-fix-pm_runtime-functions-calling.patch
queue-4.11/usb-gadget-udc-renesas_usb3-lock-for-pn_-registers-access.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-18  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18  1:03 Patch "usb: gadget: udc: renesas_usb3: fix deadlock by spinlock" has been added to the 4.11-stable tree gregkh

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.