Skip to content

Commit 91af17c

Browse files
seehearfeelchenhuacai
authored andcommitted
LoongArch: Fix definition of ftrace_regs_set_instruction_pointer()
The current definition of ftrace_regs_set_instruction_pointer() is not correct. Obviously, this function is used to set instruction pointer but not return value, so it should call instruction_pointer_set() instead of regs_set_return_value(). There is no side effect by now because it is only used for kernel live- patching which is not supported, so fix it to avoid failure when testing livepatch in the future. Fixes: 6fbff14 ("LoongArch: ftrace: Abstract DYNAMIC_FTRACE_WITH_ARGS accesses") Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 78de91b commit 91af17c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/loongarch/include/asm/ftrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ftrace_regs_get_instruction_pointer(struct ftrace_regs *fregs)
6363
static __always_inline void
6464
ftrace_regs_set_instruction_pointer(struct ftrace_regs *fregs, unsigned long ip)
6565
{
66-
regs_set_return_value(&fregs->regs, ip);
66+
instruction_pointer_set(&fregs->regs, ip);
6767
}
6868

6969
#define ftrace_regs_get_argument(fregs, n) \

0 commit comments

Comments
 (0)