[PATCH 0/2][focal/linux-azure] The console log of ARM64 Ubuntu 18.04 has duplicate output
Tim Gardner
tim.gardner at canonical.com
Tue May 31 19:33:41 UTC 2022
BugLink: https://bugs.launchpad.net/bugs/1976399
SRU Justification
[Impact]
There is duplicate output on the console . LSG team identify the root cause and suggested to apply two patches below.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ad8cd1db80cc33337bdbee63c453ef6d5132474b
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e369d8227fd211be36242fc44a9dc2209e246b9a
What we are hitting is exactly in the second commit's log. Ubuntu kernel also needs the following diff:
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f07367100ece..dca15e27123a 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2203,7 +2203,7 @@ static int __init console_setup(char *str)
* for exacly this purpose.
*/
if (str[0] == 0 || strcmp(str, "null") == 0) {
- __add_preferred_console("ttynull", 0, NULL, NULL);
+ __add_preferred_console("ttynull", 0, NULL, NULL, true);
return 1;
}
Linux kernel: 5.4.0-1078-azure
Tested in Azure
Host version: 22477.1101-1-0
Image: Canonical 0002-com-ubuntu-server-arm-preview-bionic 18_04-lts 18.04.202205020
>From Azure Serial Console, we can see duplicate output.
Such as:
[ 3.109140] Platform Keyring initialized
[ 3.109140] Platform Keyring initialized
[ 3.117148] Key type asymmetric registered
[ 3.117148] Key type asymmetric registered
[ 3.122303] Asymmetric key parser 'x509' registered
[ 3.122303] Asymmetric key parser 'x509' registered
[Test Plan]
Microsoft tested
[Where things could go wrong]
The kernel log could get corrupted.
[Other Info]
SF: #00338148
More information about the kernel-team
mailing list