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] scsi: smartpqi: Replace kmalloc + copy_from_user with memdup_user
Date: Wed, 24 Sep 2025 21:31:56 -0400 [thread overview]
Message-ID: <yq1h5wrs4fz.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20250922201832.1697874-2-thorsten.blum@linux.dev> (Thorsten Blum's message of "Mon, 22 Sep 2025 22:18:33 +0200")
Thorsten,
> 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.
Applied to 6.18/scsi-staging, thanks!
--
Martin K. Petersen
next prev parent reply other threads:[~2025-09-25 1:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 20:18 [PATCH] scsi: smartpqi: Replace kmalloc + copy_from_user with memdup_user Thorsten Blum
2025-09-23 16:17 ` Don.Brace
2025-09-25 1:31 ` Martin K. Petersen [this message]
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=yq1h5wrs4fz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.