Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Link: https://lkml.kernel.org/r/20211020174406.17889-16-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

+2 -2
+2 -2
arch/sparc/kernel/signal_32.c
··· 244 244 get_sigframe(ksig, regs, sigframe_size); 245 245 246 246 if (invalid_frame_pointer(sf, sigframe_size)) { 247 - do_exit(SIGILL); 247 + force_fatal_sig(SIGILL); 248 248 return -EINVAL; 249 249 } 250 250 ··· 336 336 sf = (struct rt_signal_frame __user *) 337 337 get_sigframe(ksig, regs, sigframe_size); 338 338 if (invalid_frame_pointer(sf, sigframe_size)) { 339 - do_exit(SIGILL); 339 + force_fatal_sig(SIGILL); 340 340 return -EINVAL; 341 341 } 342 342