Add a trailing newline ('\n') to the pr_warn! call in set_param to
ensure the kernel ring buffer flushes the message correctly and
prevents log line smearing.Link: https://github.com/Rust-for-Linux/linux/issues/1139 Signed-off-by: Kenny Glowner <[email protected]> --- rust/kernel/module_param.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs index 6a8a7a875643..fa26089be2e0 100644 --- a/rust/kernel/module_param.rs +++ b/rust/kernel/module_param.rs @@ -63,7 +63,7 @@ pub trait ModuleParam: Sized + Copy { // to be null here. if val.is_null() { // TODO: Use pr_warn_once available. - crate::pr_warn!("Null pointer passed to `module_param::set_param`"); + crate::pr_warn!("Null pointer passed to `module_param::set_param`\n"); return EINVAL.to_errno(); } -- 2.54.0

