]> Gentwo Git Trees - linux/.git/commit
tracing/osnoise: Replace kmalloc + copy_from_user with memdup_user_nul
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 1 Oct 2025 13:09:07 +0000 (15:09 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 8 Oct 2025 16:05:46 +0000 (12:05 -0400)
commitf0c029d2ff42499a62c873c14428f02bf94c28af
tree1d04e5e9f1bc9139d256b96f7eb85cef2bd429ee
parente5f0a698b34ed76002dc5cff3804a61c80233a7a
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>
kernel/trace/trace_osnoise.c