]> git.hungrycats.org Git - linux/commit
s390/stacktrace: Use break instead of return statement
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 18 Nov 2024 12:14:07 +0000 (13:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:41:06 +0000 (10:41 +0100)
commit20c26357826457dc7c8145297e60ddc012e18914
treefe09dfa5ae8c10a2f00ffa63ca974d4242ee41d5
parent3e5fbcbc388aa222ecde1e317713b74b516237d7
s390/stacktrace: Use break instead of return statement

commit 588a9836a4ef7ec3bfcffda526dfa399637e6cfc upstream.

arch_stack_walk_user_common() contains a return statement instead of a
break statement in case store_ip() fails while trying to store a callchain
entry of a user space process.
This may lead to a missing pagefault_enable() call.

If this happens any subsequent page fault of the process won't be resolved
by the page fault handler and this in turn will lead to the process being
killed.

Use a break instead of a return statement to fix this.

Fixes: ebd912ff9919 ("s390/stacktrace: Merge perf_callchain_user() and arch_stack_walk_user()")
Cc: stable@vger.kernel.org
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/stacktrace.c