diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2024-12-05 17:06:02 +0100 |
---|---|---|
committer | Petr Pavlu <petr.pavlu@suse.com> | 2024-12-23 10:46:38 +0100 |
commit | 0b7a66a2c864859fbf9bb16229c03172eef02c05 (patch) | |
tree | 4962b5542ccf4fc7c19093e05d7ba1221be5fc9a /fs/nfsd/export.c | |
parent | 4bbf9020becbfd8fc2c3da790855b7042fad455b (diff) | |
download | linux-0b7a66a2c864859fbf9bb16229c03172eef02c05.tar.gz linux-0b7a66a2c864859fbf9bb16229c03172eef02c05.tar.bz2 linux-0b7a66a2c864859fbf9bb16229c03172eef02c05.zip |
preempt: Move PREEMPT_RT before PREEMPT in vermagic.
Since the dynamic preemption has been enabled for PREEMPT_RT we have now
CONFIG_PREEMPT and CONFIG_PREEMPT_RT set simultaneously. This affects
the vermagic strings which comes now PREEMPT with PREEMPT_RT enabled.
The PREEMPT_RT module usually can not be loaded on a PREEMPT kernel
because some symbols are missing.
However if the symbols are fine then it continues and it crashes later.
The problem is that the struct module has a different layout and the
num_exentries or init members are at a different position leading to a
crash later on. This is not necessary caught by the size check in
elf_validity_cache_index_mod() because the mem member has an alignment
requirement of __module_memory_align which is big enough keep the total
size unchanged. Therefore we should keep the string accurate instead of
removing it.
Move the PREEMPT_RT check before the PREEMPT so that it takes precedence
if both symbols are enabled.
Fixes: 35772d627b55c ("sched: Enable PREEMPT_DYNAMIC for PREEMPT_RT")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Link: https://lore.kernel.org/r/20241205160602.3lIAsJRT@linutronix.de
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'fs/nfsd/export.c')
0 files changed, 0 insertions, 0 deletions