Skip to content

Commit 59aa141

Browse files
Sebastian Andrzej Siewiorpetrpavlu
authored andcommitted
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 <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Pavlu <[email protected]>
1 parent d593e0c commit 59aa141

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/arm/kernel/module-plts.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,9 @@ bool in_module_plt(unsigned long loc)
285285
struct module *mod;
286286
bool ret;
287287

288-
preempt_disable();
288+
guard(rcu)();
289289
mod = __module_text_address(loc);
290290
ret = mod && (loc - (u32)mod->arch.core.plt_ent < mod->arch.core.plt_count * PLT_ENT_SIZE ||
291291
loc - (u32)mod->arch.init.plt_ent < mod->arch.init.plt_count * PLT_ENT_SIZE);
292-
preempt_enable();
293-
294292
return ret;
295293
}

0 commit comments

Comments
 (0)