[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5.4 101/109] s390/setup: init jump labels before command line parsing
From: Vasily Gorbik <>

commit 95e61b1b5d6394b53d147c0fcbe2ae70fbe09446 upstream.

Command line parameters might set static keys. This is true for s390 at
least since commit 6471384af2a6 ("mm: security: introduce init_on_alloc=1
and init_on_free=1 boot options"). To avoid the following WARN:

static_key_enable_cpuslocked(): static key 'init_on_alloc+0x0/0x40' used
before call to jump_label_init()

call jump_label_init() just before parse_early_param().
jump_label_init() is safe to call multiple times (x86 does that), doesn't
do any memory allocations and hence should be safe to call that early.

Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Cc: <> # 5.3: d6df52e9996d: s390/maccess: add no DAT mode to kernel_write
Cc: <> # 5.3
Reviewed-by: Heiko Carstens <>
Signed-off-by: Vasily Gorbik <>
Signed-off-by: Heiko Carstens <>
Signed-off-by: Greg Kroah-Hartman <>

arch/s390/kernel/setup.c | 1 +
1 file changed, 1 insertion(+)

--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -1120,6 +1120,7 @@ void __init setup_arch(char **cmdline_p)

+ jump_label_init();
/* Deactivate elfcorehdr= kernel parameter */

 \ /
  Last update: 2020-07-14 20:53    [W:0.315 / U:2.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site