From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Badhri Jagan Sridharan <badhri@google.com>,
Alan Stern <stern@rowland.harvard.edu>,
Francesco Dolcini <francesco.dolcini@toradex.com>,
Krishna Kurapati <quic_kriskura@quicinc.com>,
Elson Roy Serrao <quic_eserrao@quicinc.com>,
linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: udc: core: Fix double unlock in usb_gadget_activate()
Date: Mon, 19 Jun 2023 17:06:46 +0200 [thread overview]
Message-ID: <2023061937-remedial-chrome-6c09@gregkh> (raw)
In-Reply-To: <031bd76e-7955-4a71-94fa-276d08d5ada5@kadam.mountain>
On Mon, Jun 19, 2023 at 05:46:28PM +0300, Dan Carpenter wrote:
> On Mon, Jun 19, 2023 at 03:39:05PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Jun 15, 2023 at 06:43:03PM +0300, Dan Carpenter wrote:
> > > Do not call mutex_unlock(&gadget->udc->connect_lock) twice in a row.
> > >
> > > Fixes: 286d9975a838 ("usb: gadget: udc: core: Prevent soft_connect_store() race")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > > ---
> > > drivers/usb/gadget/udc/core.c | 2 --
> > > 1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
> > > index 83fd1de14784..d58640a9d0ca 100644
> > > --- a/drivers/usb/gadget/udc/core.c
> > > +++ b/drivers/usb/gadget/udc/core.c
> > > @@ -878,8 +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);
> > > trace_usb_gadget_activate(gadget, ret);
> > > --
> > > 2.39.2
> > >
> >
> > Does not apply to my tree :(
>
> No longer required. The patch was reverted.
Ah good, thanks for checking.
prev parent reply other threads:[~2023-06-19 15:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 15:43 [PATCH] usb: gadget: udc: core: Fix double unlock in usb_gadget_activate() Dan Carpenter
2023-06-15 18:10 ` Badhri Jagan Sridharan
2023-06-19 13:39 ` Greg Kroah-Hartman
2023-06-19 14:46 ` Dan Carpenter
2023-06-19 15:06 ` Greg Kroah-Hartman [this message]
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=2023061937-remedial-chrome-6c09@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=badhri@google.com \
--cc=dan.carpenter@linaro.org \
--cc=francesco.dolcini@toradex.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_eserrao@quicinc.com \
--cc=quic_kriskura@quicinc.com \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox