[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SJ2PR11MB8369DC643759199AD1642C1FE11DA@SJ2PR11MB8369.namprd11.prod.outlook.com>
Date: Tue, 23 Sep 2025 19:40:48 +0000
From: <Don.Brace@...rochip.com>
To: <thorsten.blum@...ux.dev>, <James.Bottomley@...senPartnership.com>,
<martin.petersen@...cle.com>
CC: <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
________________________________________
From: Thorsten Blum <thorsten.blum@...ux.dev>
Sent: Tuesday, September 23, 2025 12:15 PM
To: Don Brace - C33706 <Don.Brace@...rochip.com>; James E.J. Bottomley <James.Bottomley@...senPartnership.com>; Martin K. Petersen <martin.petersen@...cle.com>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>; storagedev <storagedev@...rochip.com>; linux-scsi@...r.kernel.org <linux-scsi@...r.kernel.org>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>
Subject: [PATCH RESEND] scsi: hpsa: Replace kmalloc + copy_from_user with memdup_user
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
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.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
---
Acked-by: Don Brace <don.brace@...rochip.com>
Thanks for your patch.
We do not normally make changes to this driver as it is in maintenance mode.
Powered by blists - more mailing lists