diff options
Diffstat (limited to 'arch/powerpc/kernel/uprobes.c')
-rw-r--r-- | arch/powerpc/kernel/uprobes.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel/uprobes.c index 95a41ae9dfa7..3c15c320315e 100644 --- a/arch/powerpc/kernel/uprobes.c +++ b/arch/powerpc/kernel/uprobes.c @@ -7,6 +7,7 @@ * Adapted from the x86 port by Ananth N Mavinakayanahalli <ananth@in.ibm.com> */ #include <linux/kernel.h> +#include <linux/non-atomic/xchg.h> #include <linux/sched.h> #include <linux/ptrace.h> #include <linux/uprobes.h> @@ -197,14 +198,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs) { - unsigned long orig_ret_vaddr; - - orig_ret_vaddr = regs->link; - - /* Replace the return addr with trampoline addr */ - regs->link = trampoline_vaddr; - - return orig_ret_vaddr; + return __xchg(®s->link, trampoline_vaddr); } bool arch_uretprobe_is_alive(struct return_instance *ret, enum rp_check ctx, |