From: Shuah Khan <skhan@linuxfoundation.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Valentina Manea <valentina.manea.m@gmail.com>,
Igor Kotrasinski <i.kotrasinsk@samsung.com>
Cc: Shuah Khan <shuah@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] usbip: vudc: Don't enable IRQs prematurely
Date: Wed, 25 May 2022 09:13:19 -0600 [thread overview]
Message-ID: <3f9926ac-9586-522e-e70b-d524b7cd19cd@linuxfoundation.org> (raw)
In-Reply-To: <Yo4hVWcZNYzKEkIQ@kili>
On 5/25/22 6:30 AM, Dan Carpenter wrote:
> This code does:
>
> spin_unlock_irq(&udc->ud.lock);
> spin_unlock_irqrestore(&udc->lock, flags);
>
> which does not make sense. In theory, the first unlock could enable
> IRQs and then the second _irqrestore could disable them again. There
> would be a brief momemt where IRQs were enabled improperly.
>
> In real life, however, this function is always called with IRQs enabled
> and the bug does not affect runtime.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> An alternative fix would be to make changes below and also change the
> outside _irqsave/_irqrestore() to just _irq(). However, that's more
> invasive and riskier with no upside.
>
Thank you for the patch.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Greg, please pick this up.
thanks,
-- Shuah
prev parent reply other threads:[~2022-05-25 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 12:30 [PATCH] usbip: vudc: Don't enable IRQs prematurely Dan Carpenter
2022-05-25 15:13 ` Shuah Khan [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=3f9926ac-9586-522e-e70b-d524b7cd19cd@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=i.kotrasinsk@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=valentina.manea.m@gmail.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 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.