diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-01-08 10:04:45 +0100 |
---|---|---|
committer | Petr Pavlu <petr.pavlu@suse.com> | 2025-03-10 11:54:45 +0100 |
commit | 59aa1414bf33bc706d6bc9c4dc2cd57b85862a4c (patch) | |
tree | eef01ae733b20ebb1e9d99bef62f833d4df116ce | |
parent | d593e0cabdf6428560f311af0657642979b2c8ad (diff) |
ARM: module: Use RCU in all users of __module_text_address().
__module_text_address() can be invoked within a RCU section, there is no
requirement to have preemption disabled.
Replace the preempt_disable() section around __module_text_address()
with RCU.
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250108090457.512198-17-bigeasy@linutronix.de
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
-rw-r--r-- | arch/arm/kernel/module-plts.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c index da2ee8d6ef1a..354ce16d83cb 100644 --- a/arch/arm/kernel/module-plts.c +++ b/arch/arm/kernel/module-plts.c @@ -285,11 +285,9 @@ bool in_module_plt(unsigned long loc) struct module *mod; bool ret; - preempt_disable(); + guard(rcu)(); mod = __module_text_address(loc); ret = mod && (loc - (u32)mod->arch.core.plt_ent < mod->arch.core.plt_count * PLT_ENT_SIZE || loc - (u32)mod->arch.init.plt_ent < mod->arch.init.plt_count * PLT_ENT_SIZE); - preempt_enable(); - return ret; } |