]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 21 Nov 2024 11:44:07 +0000 (12:44 +0100)
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>
arch/s390/kernel/stacktrace.c

index 9f59837d159e0ccf2c622e3dc3a6cb26c33899dc..40edfde25f5b977230080f9c4f94fe6c0c87ed4a 100644 (file)
@@ -151,7 +151,7 @@ void arch_stack_walk_user_common(stack_trace_consume_fn consume_entry, void *coo
                                break;
                }
                if (!store_ip(consume_entry, cookie, entry, perf, ip))
-                       return;
+                       break;
                first = false;
        }
        pagefault_enable();