[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b4ccd0c4-78f7-4f7c-bf6f-cae048c6e841@rowland.harvard.edu>
Date: Mon, 24 Jul 2023 10:26:03 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Michael Grzeschik <m.grzeschik@...gutronix.de>
Cc: linux-usb@...r.kernel.org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH] usb: gadget: core: remove unbalanced mutex_unlock in
usb_gadget_activate
On Sat, Jul 22, 2023 at 12:22:56AM +0200, Michael Grzeschik wrote:
> Commit 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race")
> introduced one extra mutex_unlock of connect_lock in the usb_gadget_active function.
>
> Fixes: 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race")
> Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
> ---
Hard to see how we missed that...
Reviewed-by: Alan Stern <stern@...land.harvard.edu>
Thanks!
> drivers/usb/gadget/udc/core.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
> index 59188ea065e0c9..cd58f2a4e7f34d 100644
> --- a/drivers/usb/gadget/udc/core.c
> +++ b/drivers/usb/gadget/udc/core.c
> @@ -878,7 +878,6 @@ int usb_gadget_activate(struct usb_gadget *gadget)
> */
> if (gadget->connected)
> ret = usb_gadget_connect_locked(gadget);
> - mutex_unlock(&gadget->udc->connect_lock);
>
> unlock:
> mutex_unlock(&gadget->udc->connect_lock);
> --
> 2.39.2
>
Powered by blists - more mailing lists