[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adba817d-a02b-49fb-bf3d-a22779303764@paulmck-laptop>
Date: Tue, 25 Jul 2023 20:48:13 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the rcu tree
On Tue, Jul 25, 2023 at 08:33:06PM -0700, Paul E. McKenney wrote:
> On Wed, Jul 26, 2023 at 12:32:30PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the rcu tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> >
> > WARNING: modpost: vmlinux: section mismatch in reference: cmdline_load_proc_show+0x22 (section: .text) -> boot_command_line (section: .init.data)
> >
> > Introduced by commit
> >
> > cf9eca90a339 ("fs/proc: Add /proc/cmdline_load for boot loader arguments")
>
> That __initdata needs to be __ro_after_init, doesn't it? Will fix,
> thank you!
Sigh. Hit "send" too soon. :-/
Does the following incremental diff (to be squashed into the original) help?
Thanx, Paul
------------------------------------------------------------------------
diff --git a/init/main.c b/init/main.c
index c946ab87783a..981170da0b1c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(system_state);
void (*__initdata late_time_init)(void);
/* Untouched command line saved by arch-specific code. */
-char __initdata boot_command_line[COMMAND_LINE_SIZE];
+char boot_command_line[COMMAND_LINE_SIZE] __ro_after_init;
/* Untouched saved command line (eg. for /proc) */
char *saved_command_line __ro_after_init;
unsigned int saved_command_line_len __ro_after_init;
Powered by blists - more mailing lists