Subject: Re: linux-next: build failure after merge of the printk tree

From: Petr Mladek <[email-masked]>
Date: Mon, 16 Jan 2023 16:54:32 +0100

On Mon 2023-01-16 10:23:01, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the printk tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> ERROR: modpost: "console_srcu_read_lock_is_held" [drivers/tty/serial/kgdboc.ko] undefined!
> 
> Caused by commit
> 
>   75ffddf01347 ("tty: serial: kgdboc: fix mutex locking order for configure_kgdboc()")

Great catch! Thanks a lot for the report.

It gets fixed by:

--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -123,6 +123,7 @@ bool console_srcu_read_lock_is_held(void)
 {
 	return srcu_read_lock_held(&console_srcu);
 }
+EXPORT_SYMBOL(console_srcu_read_lock_is_held);
 #endif
 
 enum devkmsg_log_bits {

I have added this fix by ammending the problematic commit so that we
do not break bisection, see
https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?h=rework/console-list-lock&id=3ef5abd9b5c738bc6fa9a65e40331ef2cb03ad9c

Best Regards,
Petr