linux/drivers/scsi/smartpqi
Thorsten Blum 0ac3c901fb scsi: smartpqi: Replace kmalloc() + copy_from_user() with memdup_user()
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>
Message-Id: <20250922201832.1697874-2-thorsten.blum@linux.dev>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-09-24 21:41:24 -04:00
..
Kconfig scsi: smartpqi: Update copyright to 2023 2023-05-08 07:17:12 -04:00
Makefile
smartpqi_init.c scsi: smartpqi: Replace kmalloc() + copy_from_user() with memdup_user() 2025-09-24 21:41:24 -04:00
smartpqi_sas_transport.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
smartpqi_sis.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
smartpqi_sis.h scsi: smartpqi: Add fw log to kdump 2024-08-28 22:10:34 -04:00
smartpqi.h scsi: smartpqi: add counter for parity write stream requests 2024-08-28 22:10:34 -04:00