Skip to content

Commit 7e74a7c

Browse files
Sebastian Andrzej Siewiorpetrpavlu
Sebastian Andrzej Siewior
authored andcommitted
kprobes: 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: David S. Miller <[email protected]> Cc: Anil S Keshavamurthy <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Naveen N Rao <[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 8c6eb7c commit 7e74a7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/kprobes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ static int check_kprobe_address_safe(struct kprobe *p,
15471547
/* Ensure the address is in a text area, and find a module if exists. */
15481548
*probed_mod = NULL;
15491549
if (!core_kernel_text((unsigned long) p->addr)) {
1550-
guard(preempt)();
1550+
guard(rcu)();
15511551
*probed_mod = __module_text_address((unsigned long) p->addr);
15521552
if (!(*probed_mod))
15531553
return -EINVAL;

0 commit comments

Comments
 (0)