printk: Export match_devname_and_update_preferred_console()
PATCH 1/1 printk: Export match_devname_and_update_preferred_console()
When building serial_base as a module, modpost fails with the following error message:
ERROR: modpost: "match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!
Export the symbol to allow using it from modules.
--- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+)
kernel/printk/printk.c +1 -0
@@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname,return -ENOENT ; } +EXPORT_SYMBOL_GPL (match_devname_and_update_preferred_console);bool console_suspend_enabled = true;EXPORT_SYMBOL (console_suspend_enabled);
Signature · 1 line
2.33.0
Quoted 7 lines · Yu Liao
When building
serial_baseas a module, modpost fails with the following error message:ERROR: modpost: "
match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!Export the symbol to allow using it from modules.
I think the issue is with CONFIG_PRINTK is no set, and serial drivers select SERIAL_CORE_CONSOLE? And when serial_base is a module, there is no kernel console.
I replied earlier today to the lkp error report along those lines, but please let me know if there is more to the issue than that.
Regards,
Tony
Quoted 23 lines
Reported-by kernel test robot <[email protected]>Fixes 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()")Signed-off-by Yu Liao <[email protected]>--- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+)kernel/printk/printk.c +1
-0@@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname,return -ENOENT ; } +EXPORT_SYMBOL_GPL (match_devname_and_update_preferred_console);bool console_suspend_enabled = true;EXPORT_SYMBOL (console_suspend_enabled);Signature · 1 line
2.33.0
Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Yu Liao
When building
serial_baseas a module, modpost fails with the following error message:ERROR: modpost: "
match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!
Quoted 8 lines
Quoted 1 line
Export the symbol to allow using it from modules.
I think the issue is with
CONFIG_PRINTKis no set, and serial drivers selectSERIAL_CORE_CONSOLE? And whenserial_baseis a module, there is no kernel console.I replied earlier today to the lkp error report along those lines, but please let me know if there is more to the issue than that.
Sorry I gave wrong information above. The issue can be hit also with CONFIG_PRINTK=y and serial_base as a loadable module.
Regards,
Tony
Quoted 23 lines
Quoted 23 lines
Reported-by kernel test robot <[email protected]>Fixes 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()")Signed-off-by Yu Liao <[email protected]>--- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+)kernel/printk/printk.c +1
-0@@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname,return -ENOENT ; } +EXPORT_SYMBOL_GPL (match_devname_and_update_preferred_console);bool console_suspend_enabled = true;EXPORT_SYMBOL (console_suspend_enabled);Signature · 1 line
2.33.0
Petr Mladek
maintainerQuoted 14 lines · Tony Lindgren
Quoted 13 lines · Tony Lindgren
Quoted 7 lines · Yu Liao
When building
serial_baseas a module, modpost fails with the following error message:ERROR: modpost: "
match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!Export the symbol to allow using it from modules.
I think the issue is with
CONFIG_PRINTKis no set, and serial drivers selectSERIAL_CORE_CONSOLE? And whenserial_baseis a module, there is no kernel console.
Quoted 5 lines
Quoted 2 lines
I replied earlier today to the lkp error report along those lines, but please let me know if there is more to the issue than that.
Sorry I gave wrong information above. The issue can be hit also with
CONFIG_PRINTK=yandserial_baseas a loadable module.
Yes, this is my understanding. The problem has happened when serial_base was built as a module. So exporting the symbol looks like the right fix.
Best Regards,
Petr
Quoted 15 lines · Petr Mladek
Quoted 14 lines · Tony Lindgren
Quoted 13 lines · Tony Lindgren
Quoted 7 lines · Yu Liao
When building
serial_baseas a module, modpost fails with the following error message:ERROR: modpost: "
match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!Export the symbol to allow using it from modules.
I think the issue is with
CONFIG_PRINTKis no set, and serial drivers selectSERIAL_CORE_CONSOLE? And whenserial_baseis a module, there is no kernel console.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I replied earlier today to the lkp error report along those lines, but please let me know if there is more to the issue than that.
Sorry I gave wrong information above. The issue can be hit also with
CONFIG_PRINTK=yandserial_baseas a loadable module.Yes, this is my understanding. The problem has happened when
serial_basewas built as a module. So exporting the symbol looks like the right fix.
Yes agreed.
And, Yu, thanks for fixing the issue!
Regards,
Tony
Petr Mladek
maintainerQuoted 6 lines · Yu Liao
When building
serial_baseas a module, modpost fails with the following error message:ERROR: modpost: "
match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!
Quoted 6 lines
Export the symbol to allow using it from modules.
Reported-by kernel test robot <[email protected]>Fixes 12c91cec3155 ("serial: core: Add serial_base_match_and_update_preferred_console()")Signed-off-by Yu Liao <[email protected]>
It looks good. I have pushed the fix into printk/linux.git, branch for-6.11-fixup. I am going to send a pull request later this week.
Best Regards,
Petr
The following commit has been merged into the sched/rt branch of tip:
The following commit has been merged into the sched/rt branch of tip:
Commit-ID: 3e5b2e81f17f176a4d451c1dd1794e64644319c4 Gitweb: https://git.kernel.org/tip/3e5b2e81f17f176a4d451c1dd1794e64644319c4 Author: Yu Liao <[email protected]> AuthorDate: Mon, 09 Sep 2024 15:56:52 +08:00 Committer: Petr Mladek <[email protected]> CommitterDate: Mon, 09 Sep 2024 17:35:06 +02:00
printk: Export match_devname_and_update_preferred_console()
When building serial_base as a module, modpost fails with the following error message:
ERROR: modpost: "match_devname_and_update_preferred_console" [drivers/tty/serial/serial_base.ko] undefined!
Export the symbol to allow using it from modules.
--- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+)
kernel/printk/printk.c +1 -0
@@ -2620,6 +2620,7 @@ int match_devname_and_update_preferred_console(const char *devname,return -ENOENT ; } +EXPORT_SYMBOL_GPL (match_devname_and_update_preferred_console);bool console_suspend_enabled = true;EXPORT_SYMBOL (console_suspend_enabled);