Vasily Gorbik 94b725f66d s390/setup: init jump labels before command line parsing
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: <stable@vger.kernel.org> # 5.3: d6df52e9996d: s390/maccess: add no DAT mode to kernel_write
Cc: <stable@vger.kernel.org> # 5.3
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-11 16:32:02 +01:00
..
2020-06-30 23:17:14 -04:00
2018-04-10 07:38:54 +02:00
2023-02-06 07:49:45 +01:00
2018-07-02 11:24:59 +02:00
2023-02-06 07:49:45 +01:00
2018-07-18 08:32:17 +02:00
2020-08-26 10:31:03 +02:00
2018-07-04 08:35:18 +02:00
2018-02-27 08:05:23 +01:00
2023-03-11 16:31:48 +01:00