Commit f5507ae
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>1 parent 11aa54b commit f5507ae
1 file changed
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1426 | 1422 | | |
1427 | 1423 | | |
1428 | 1424 | | |
1429 | | - | |
1430 | | - | |
1431 | 1425 | | |
1432 | 1426 | | |
1433 | 1427 | | |
| |||
0 commit comments