Skip to content

Commit 78ba392

Browse files
KAGA-KOKOpmladek
authored andcommitted
printk: Mark __printk percpu data ready __ro_after_init
This variable cannot change post boot. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20220924000454.3319186-6-john.ogness@linutronix.de
1 parent eb4531b commit 78ba392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/printk/printk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static struct printk_ringbuffer *prb = &printk_rb_static;
430430
* per_cpu_areas are initialised. This variable is set to true when
431431
* it's safe to access per-CPU data.
432432
*/
433-
static bool __printk_percpu_data_ready __read_mostly;
433+
static bool __printk_percpu_data_ready __ro_after_init;
434434

435435
bool printk_percpu_data_ready(void)
436436
{

0 commit comments

Comments
 (0)