Commit 6434e3e
committed
tracing/osnoise: Replace kmalloc + copy_from_user with memdup_user_nul
JIRA: https://issues.redhat.com/browse/RHEL-117873
commit f0c029d
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date: Wed Oct 1 15:09:07 2025 +0200
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 <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20251001130907.364673-2-thorsten.blum@linux.dev
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Tomas Glozar <tglozar@redhat.com>1 parent bb770c5 commit 6434e3e
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 | | |
| |||
2331 | 2332 | | |
2332 | 2333 | | |
2333 | 2334 | | |
2334 | | - | |
2335 | | - | |
2336 | | - | |
2337 | | - | |
2338 | | - | |
2339 | | - | |
2340 | | - | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
2341 | 2338 | | |
2342 | 2339 | | |
2343 | 2340 | | |
| |||
0 commit comments