]> git.ipfire.org Git - thirdparty/linux.git/commit
s390/hmcdrv: Replace kmalloc() + copy_from_user() with memdup_user_nul()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 5 Sep 2025 11:02:23 +0000 (13:02 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 9 Sep 2025 13:03:13 +0000 (15:03 +0200)
commit5450abb0dea4f9fb432dea2ca92ea7a9bd25650b
tree746b60fda6ef04ea41d25588d7b55f6b2d1fe44b
parentf5507aefc9114ced49d1ee527f63ea12ff5d7751
s390/hmcdrv: Replace kmalloc() + copy_from_user() with memdup_user_nul()

Replace kmalloc() followed by copy_from_user() with memdup_user_nul() to
improve and simplify hmcdrv_dev_write(). Remove the manual
NUL-termination.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/char/hmcdrv_dev.c