mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
powerpc/ftrace: Fix stack teardown in ftrace_no_trace
Commit41a506ef71
("powerpc/ftrace: Create a dummy stackframe to fix stack unwind") added use of a new stack frame on ftrace entry to fix stack unwind. However, the commit missed updating the offset used while tearing down the ftrace stack when ftrace is disabled. Fix the same. In addition, the commit missed saving the correct stack pointer in pt_regs. Update the same. Fixes:41a506ef71
("powerpc/ftrace: Create a dummy stackframe to fix stack unwind") Cc: stable@vger.kernel.org # v6.5+ Signed-off-by: Naveen N Rao <naveen@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231130065947.2188860-1-naveen@kernel.org
This commit is contained in:
parent
dc158d23b3
commit
4b3338aaa7
@ -62,7 +62,7 @@
|
||||
.endif
|
||||
|
||||
/* Save previous stack pointer (r1) */
|
||||
addi r8, r1, SWITCH_FRAME_SIZE
|
||||
addi r8, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
PPC_STL r8, GPR1(r1)
|
||||
|
||||
.if \allregs == 1
|
||||
@ -182,7 +182,7 @@ ftrace_no_trace:
|
||||
mflr r3
|
||||
mtctr r3
|
||||
REST_GPR(3, r1)
|
||||
addi r1, r1, SWITCH_FRAME_SIZE
|
||||
addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
|
||||
mtlr r0
|
||||
bctr
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user