aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/microchip-spi.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2025-06-10 16:33:28 +0000
committerDaniel Gomez <[email protected]>2025-07-08 18:52:30 +0000
commit570db4b39f535a8bb722adb8be0280d09e34ca99 (patch)
tree67412e8605e19f9f70267f7e71d093f06638ebeb /drivers/fpga/microchip-spi.c
parentmodule: Avoid unnecessary return value initialization in move_module() (diff)
downloadkernel-570db4b39f535a8bb722adb8be0280d09e34ca99.tar.gz
kernel-570db4b39f535a8bb722adb8be0280d09e34ca99.zip
module: Make sure relocations are applied to the per-CPU section
The per-CPU data section is handled differently than the other sections. The memory allocations requires a special __percpu pointer and then the section is copied into the view of each CPU. Therefore the SHF_ALLOC flag is removed to ensure move_module() skips it. Later, relocations are applied and apply_relocations() skips sections without SHF_ALLOC because they have not been copied. This also skips the per-CPU data section. The missing relocations result in a NULL pointer on x86-64 and very small values on x86-32. This results in a crash because it is not skipped like NULL pointer would and can't be dereferenced. Such an assignment happens during static per-CPU lock initialisation with lockdep enabled. Allow relocation processing for the per-CPU section even if SHF_ALLOC is missing. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Fixes: 1a6100caae425 ("Don't relocate non-allocated regions in modules.") #v2.6.1-rc3 Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Petr Pavlu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Gomez <[email protected]> Message-ID: <[email protected]>
Diffstat (limited to 'drivers/fpga/microchip-spi.c')
0 files changed, 0 insertions, 0 deletions