]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: scsi_debug: Replace kzalloc() + copy_from_user() with memdup_user_nul()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 5 Sep 2025 10:31:45 +0000 (12:31 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 10 Sep 2025 02:28:50 +0000 (22:28 -0400)
commit8791b07894ab75361195094828dc56b7ed449c36
tree3e205163fffa591b0617c8530a1548986dbccaba
parent5cffc679ad1de542ef8a247b12283cbe57511fc8
scsi: scsi_debug: Replace kzalloc() + copy_from_user() with memdup_user_nul()

Replace kzalloc() followed by copy_from_user() with memdup_user_nul() to
improve and simplify sdebug_error_write().

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c