From: <Don.Brace@microchip.com>
To: <thorsten.blum@linux.dev>,
<James.Bottomley@HansenPartnership.com>,
<martin.petersen@oracle.com>
Cc: <storagedev@microchip.com>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: smartpqi: Replace kmalloc + copy_from_user with memdup_user
Date: Tue, 23 Sep 2025 16:17:07 +0000 [thread overview]
Message-ID: <SJ2PR11MB83697AF910EED3F2C5D3C082E11DA@SJ2PR11MB8369.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250922201832.1697874-2-thorsten.blum@linux.dev>
________________________________________
From: Thorsten Blum <thorsten.blum@linux.dev>
Sent: Monday, September 22, 2025 3:18 PM
To: Don Brace - C33706 <Don.Brace@microchip.com>; James E.J. Bottomley <James.Bottomley@HansenPartnership.com>; Martin K. Petersen <martin.petersen@oracle.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>; storagedev <storagedev@microchip.com>; linux-scsi@vger.kernel.org <linux-scsi@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
Subject: [PATCH] scsi: smartpqi: 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
simplify and improve pqi_passthru_ioctl().
Since memdup_user() already allocates memory, use kzalloc() in the else
branch instead of manually zeroing 'kernel_buffer' using memset(0).
Return early if an error occurs. No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Acked-by: Don Brace <don.brace@microchip.com>
Sorry about duplicate e-mail, forgot to switch to text-only.
next prev parent reply other threads:[~2025-09-23 16:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 20:18 Thorsten Blum
2025-09-23 16:17 ` Don.Brace [this message]
2025-09-25 1:31 ` Martin K. Petersen
2025-09-30 2:36 ` Martin K. Petersen
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=SJ2PR11MB83697AF910EED3F2C5D3C082E11DA@SJ2PR11MB8369.namprd11.prod.outlook.com \
--to=don.brace@microchip.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--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®