From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Don Brace <don.brace@microchip.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
storagedev@microchip.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] scsi: hpsa: Replace kmalloc + copy_from_user with memdup_user
Date: Wed, 24 Sep 2025 21:41:55 -0400 [thread overview]
Message-ID: <yq15xd7s3zh.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250923171505.1847356-1-thorsten.blum@linux.dev> (Thorsten Blum's message of "Tue, 23 Sep 2025 19:15:04 +0200")
Thorsten,
> Replace kmalloc() followed by copy_from_user() with memdup_user() to
> improve and simplify hpsa_passthru_ioctl().
>
> Since memdup_user() already allocates memory, use kzalloc() in the
> else branch instead of manually zeroing 'buff' using memset(0).
>
> Return early if an error occurs and remove the 'out_kfree' label.
Applied to 6.18/scsi-staging, thanks!
--
Martin K. Petersen
prev parent reply other threads:[~2025-09-25 1:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 17:15 Thorsten Blum
2025-09-23 19:40 ` Don.Brace
2025-09-23 21:15 ` Thorsten Blum
2025-09-25 1:41 ` Martin K. Petersen [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=yq15xd7s3zh.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=don.brace@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=storagedev@microchip.com \
--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
all inboxes | Powered by JetHome®