linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Albert Wang <albertccwang@google.com>
Cc: balbi@kernel.org, quic_jackp@quicinc.com, badhri@google.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: dwc3: gadget: Move null pinter check after window closed
Date: Thu, 12 May 2022 11:39:31 +0200	[thread overview]
Message-ID: <YnzV04QXBEM0GoxL@kroah.com> (raw)
In-Reply-To: <20220512093146.1301669-1-albertccwang@google.com>

On Thu, May 12, 2022 at 05:31:46PM +0800, Albert Wang wrote:
> After inspecting further, we do see the locking is implicit, with the
> main gotcha being the unlock/re-lock. That creates a window for a race
> to happen. This change moves the NULL check to be adjacent to where
> to it's used and after the window is "closed".
> 
> Fixes: 26288448120b ("usb: dwc3: gadget: Fix null pointer exception")
> 
> Signed-off-by: Albert Wang <albertccwang@google.com>

No blank line between Fixes: and signed-off-by please.

> ---
>  v2: Remove redundant 'else' and add additional comments and more
>      descriptive commit text

I see two v2 copies on the lists for this commit.

Please send a v3, never duplicate the versions, that just causes
confusion, right?

thanks,

greg k-h

  reply	other threads:[~2022-05-12  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  9:31 [PATCH v2] usb: dwc3: gadget: Move null pinter check after window closed Albert Wang
2022-05-12  9:39 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-12  4:37 Albert Wang
2022-05-12  7:33 ` Greg KH

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=YnzV04QXBEM0GoxL@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=albertccwang@google.com \
    --cc=badhri@google.com \
    --cc=balbi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    /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;
as well as URLs for NNTP newsgroup(s).