Skip to content

Commit

Permalink
livepatch: Add a missing newline character in klp_module_coming()
Browse files Browse the repository at this point in the history
The error message is not printed immediately because it does not end with
a newline character.

Before:
root@localhost:~# insmod vmlinux.ko
insmod: ERROR: could not insert module vmlinux.ko: Invalid parameters

After:
root@localhost:~# insmod vmlinux.ko
[   43.982558] livepatch: vmlinux.ko: invalid module name
insmod: ERROR: could not insert module vmlinux.ko: Invalid parameters

Fixes: dcf550e ("livepatch: Disallow vmlinux.ko")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220830112855.749-1-thunder.leizhen@huawei.com
  • Loading branch information
Zhen Lei authored and Petr Mladek committed Sep 1, 2022
1 parent 747f7a2 commit 66d8529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ int klp_module_coming(struct module *mod)
return -EINVAL;

if (!strcmp(mod->name, "vmlinux")) {
pr_err("vmlinux.ko: invalid module name");
pr_err("vmlinux.ko: invalid module name\n");
return -EINVAL;
}

Expand Down

0 comments on commit 66d8529

Please sign in to comment.