From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Rex Nie <rex.nie@jaguarmicro.com>, Jann Horn <jannh@google.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: core: replace memdup_user with memdup_array_user in proc_do_submiturb
Date: Wed, 8 Oct 2025 13:05:01 +0200 [thread overview]
Message-ID: <2025100824-payday-anemic-b179@gregkh> (raw)
In-Reply-To: <20250919122601.1094728-2-thorsten.blum@linux.dev>
On Fri, Sep 19, 2025 at 02:25:57PM +0200, Thorsten Blum wrote:
> Use memdup_array_user() instead of memdup_user() in proc_do_submiturb().
> Compared to memdup_user(), memdup_array_user() automatically checks for
> multiplication overflow. Remove the obsolete local variable 'isofrmlen'.
But there is no chance for overflow here, right?
I'm all for using "proper" functions, but there is no need to go and
rewrite existing code for them if you can't test the results. Did you
test this?
> Return early if an error occurs instead of manually setting 'ret' and
> using 'goto error'.
There is no need to do that, please leave the code flow alone as we
"know" it works properly as-is.
> No functional changes intended.
"intended", but did you succeed? :)
Testing is good, please do that.
thanks,
greg k-h
prev parent reply other threads:[~2025-10-08 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 12:25 [PATCH] USB: core: replace memdup_user with memdup_array_user in proc_do_submiturb Thorsten Blum
2025-10-08 11:05 ` 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=2025100824-payday-anemic-b179@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rex.nie@jaguarmicro.com \
--cc=stern@rowland.harvard.edu \
--cc=thorsten.blum@linux.dev \
/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