2023-09-14 07:34:57

by Zheng Yejian

[permalink] [raw]
Subject: [PATCH] livepatch: Fix missing newline character in klp_resolve_symbols()

Without the newline character, the log may not be printed immediately
after the error occurs.

Fixes: ca376a937486 ("livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols")
Signed-off-by: Zheng Yejian <[email protected]>
---
kernel/livepatch/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index 61328328c474..ecbc9b6aba3a 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -243,7 +243,7 @@ static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab,
* symbols are exported and normal relas can be used instead.
*/
if (!sec_vmlinux && sym_vmlinux) {
- pr_err("invalid access to vmlinux symbol '%s' from module-specific livepatch relocation section",
+ pr_err("invalid access to vmlinux symbol '%s' from module-specific livepatch relocation section\n",
sym_name);
return -EINVAL;
}
--
2.25.1


2023-09-20 15:25:30

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH] livepatch: Fix missing newline character in klp_resolve_symbols()

On Thu 2023-09-14 15:26:44, Zheng Yejian wrote:
> Without the newline character, the log may not be printed immediately
> after the error occurs.
>
> Fixes: ca376a937486 ("livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols")
> Signed-off-by: Zheng Yejian <[email protected]>

Reviewed-by: Petr Mladek <[email protected]>

Best Regards,
Petr

2023-09-20 16:13:06

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH] livepatch: Fix missing newline character in klp_resolve_symbols()

On Thu 2023-09-14 15:26:44, Zheng Yejian wrote:
> Without the newline character, the log may not be printed immediately
> after the error occurs.
>
> Fixes: ca376a937486 ("livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols")
> Signed-off-by: Zheng Yejian <[email protected]>

JFYI, the patch has been committed into livepatching.git, branch for-6.7.

Best Regards,
Petr