]> git.baikalelectronics.ru Git - kernel.git/commit
s390/setup: init jump labels before command line parsing
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 18 Jun 2020 15:17:19 +0000 (17:17 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 29 Jun 2020 14:28:39 +0000 (16:28 +0200)
commit43826b99ab277ec0e29bdfa02e3b9b652d8dac9b
tree2011e99be78a33fb38c1e3b99552754c4121cb8d
parent3092fdb9e4908aeb136a50c7af7cc71c480ff083
s390/setup: init jump labels before command line parsing

Command line parameters might set static keys. This is true for s390 at
least since commit be12c6cbbe17 ("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: be12c6cbbe17 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Cc: <stable@vger.kernel.org> # 5.3: 3092fdb9e490: 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>
arch/s390/kernel/setup.c