Skip to content

Commit 086ec44

Browse files
committed
signal/sparc32: In setup_rt_frame and setup_fram use force_fatal_sig
Modify the 32bit version of setup_rt_frame and setup_frame to act similar to the 64bit version of setup_rt_frame and fail with a signal instead of calling do_exit. Replacing do_exit(SIGILL) with force_fatal_signal(SIGILL) ensures that the process will be terminated cleanly when the stack frame is invalid, instead of just killing off a single thread and leaving the process is a weird state. Cc: David Miller <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Eric W. Biederman <[email protected]>
1 parent c317d30 commit 086ec44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/sparc/kernel/signal_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static int setup_frame(struct ksignal *ksig, struct pt_regs *regs,
244244
get_sigframe(ksig, regs, sigframe_size);
245245

246246
if (invalid_frame_pointer(sf, sigframe_size)) {
247-
do_exit(SIGILL);
247+
force_fatal_sig(SIGILL);
248248
return -EINVAL;
249249
}
250250

@@ -336,7 +336,7 @@ static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs,
336336
sf = (struct rt_signal_frame __user *)
337337
get_sigframe(ksig, regs, sigframe_size);
338338
if (invalid_frame_pointer(sf, sigframe_size)) {
339-
do_exit(SIGILL);
339+
force_fatal_sig(SIGILL);
340340
return -EINVAL;
341341
}
342342

0 commit comments

Comments
 (0)