From: Greg KH <gregkh@linuxfoundation.org>
To: Karol Przybylski <karprzy7@gmail.com>
Cc: paul@crapouillou.net, tudor.ambarus@linaro.org,
Chris.Wulff@biamp.com, david.sands@biamp.com,
viro@zeniv.linux.org.uk, m.grzeschik@pengutronix.de,
peter@korsgaard.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] usb: gadget: f_fs: remove unused values and add immediate returns
Date: Thu, 7 Nov 2024 06:15:36 +0100 [thread overview]
Message-ID: <2024110719-kennel-tiptoeing-3409@gregkh> (raw)
In-Reply-To: <20241106183032.80155-1-karprzy7@gmail.com>
On Wed, Nov 06, 2024 at 07:30:32PM +0100, Karol Przybylski wrote:
> In case of faulty copy_from_user call inside ffs_epfile_ioctl, error code is
> saved in a variable. However, this variable is later overwritten in every possible
> path, which overshadows initial assignment.
>
> This patch fixes it by returning the error code immediately and exiting the function.
>
> Error discovered in coverity scan - CID 1583682
>
> Signed-off-by: Karol Przybylski <karprzy7@gmail.com>
> ---
> drivers/usb/gadget/function/f_fs.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
What commit id does this fix?
How was this change tested?
thanks,
greg k-h
next prev parent reply other threads:[~2024-11-07 5:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 18:30 [PATCH] usb: gadget: f_fs: remove unused values and add immediate returns Karol Przybylski
2024-11-07 5:15 ` Greg KH [this message]
2024-12-15 11:41 ` Karol P
2024-12-15 11:52 ` 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=2024110719-kennel-tiptoeing-3409@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Chris.Wulff@biamp.com \
--cc=david.sands@biamp.com \
--cc=karprzy7@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=paul@crapouillou.net \
--cc=peter@korsgaard.com \
--cc=skhan@linuxfoundation.org \
--cc=tudor.ambarus@linaro.org \
--cc=viro@zeniv.linux.org.uk \
/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