[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq15xd7s3zh.fsf@ca-mkp.ca.oracle.com>
Date: Wed, 24 Sep 2025 21:41:55 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Don Brace <don.brace@...rochip.com>,
"James E.J. Bottomley"
<James.Bottomley@...senPartnership.com>,
"Martin K. Petersen"
<martin.petersen@...cle.com>,
storagedev@...rochip.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] scsi: hpsa: Replace kmalloc + copy_from_user
with memdup_user
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
Powered by blists - more mailing lists