]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/ftrace: Fix stack teardown in ftrace_no_trace
authorNaveen N Rao <naveen@kernel.org>
Fri, 15 Dec 2023 11:11:22 +0000 (16:41 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 14:32:39 +0000 (15:32 +0100)
commit75fbe0d9d54dab4a8a15f562a2405084dba82b98
tree0dab0ec96d1bc05554a64317c2d1bf45d2dd7393
parentae9be850788d90a91d48221ea8429f4e7b9f14cd
powerpc/ftrace: Fix stack teardown in ftrace_no_trace

commit 4b3338aaa74d7d4ec5b6734dc298f0db94ec83d2 upstream.

Commit 41a506ef71eb ("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: 41a506ef71eb ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/trace/ftrace_64_mprofile.S