Commit f0c029d
tracing/osnoise: Replace kmalloc + copy_from_user with memdup_user_nul
Replace kmalloc() followed by copy_from_user() with memdup_user_nul() to
simplify and improve osnoise_cpus_write(). Remove the manual
NUL-termination.
No functional changes intended.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent e5f0a69 commit f0c029d
1 file changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
2325 | 2326 | | |
2326 | 2327 | | |
2327 | 2328 | | |
2328 | | - | |
2329 | | - | |
2330 | | - | |
2331 | | - | |
2332 | | - | |
2333 | | - | |
2334 | | - | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
2335 | 2332 | | |
2336 | 2333 | | |
2337 | 2334 | | |
| |||
0 commit comments