]> Gentwo Git Trees - linux/.git/commit
s390/debug: Replace kmalloc() + copy_from_user() with memdup_user_nul()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 4 Sep 2025 11:40:29 +0000 (13:40 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 9 Sep 2025 13:03:12 +0000 (15:03 +0200)
commitf5507aefc9114ced49d1ee527f63ea12ff5d7751
tree2158f6e0a53ce3c6401f58a42083e1550f8034a0
parent11aa54ba4cfa5390ea47c9a1fc62502abce1f6b9
s390/debug: Replace kmalloc() + copy_from_user() with memdup_user_nul()

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

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/debug.c