From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:37706 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbdFRBF4 (ORCPT ); Sat, 17 Jun 2017 21:05:56 -0400 Subject: Patch "usb: gadget: udc: renesas_usb3: fix deadlock by spinlock" has been added to the 4.11-stable tree To: yoshihiro.shimoda.uh@renesas.com, felipe.balbi@linux.intel.com, gregkh@linuxfoundation.org Cc: , From: Date: Sun, 18 Jun 2017 09:03:46 +0800 Message-ID: <1497747826205224@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 067d6fdc558d2c43f0bfdc7af99630dd5eb08dc5 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Wed, 26 Apr 2017 20:50:08 +0900 Subject: usb: gadget: udc: renesas_usb3: fix deadlock by spinlock From: Yoshihiro Shimoda 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 Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- 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