mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
signal: Replace force_sigsegv(SIGSEGV) with force_fatal_sig(SIGSEGV)
Now that force_fatal_sig exists it is unnecessary and a bit confusing to use force_sigsegv in cases where the simpler force_fatal_sig is wanted. So change every instance we can to make the code clearer. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Link: https://lkml.kernel.org/r/877de7jrev.fsf@disp2133 Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
0fdc0c4279
commit
e21294a7aa
8 changed files with 9 additions and 9 deletions
|
@ -294,7 +294,7 @@ int elf_check_arch(const struct elf32_hdr *x)
|
||||||
eflags = x->e_flags;
|
eflags = x->e_flags;
|
||||||
if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) {
|
if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) {
|
||||||
pr_err("ABI mismatch - you need newer toolchain\n");
|
pr_err("ABI mismatch - you need newer toolchain\n");
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ asmlinkage void set_esp0(unsigned long ssp)
|
||||||
*/
|
*/
|
||||||
asmlinkage void fpsp040_die(void)
|
asmlinkage void fpsp040_die(void)
|
||||||
{
|
{
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_M68KFPU_EMU
|
#ifdef CONFIG_M68KFPU_EMU
|
||||||
|
|
|
@ -1063,7 +1063,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
|
||||||
* We kill the task with a SIGSEGV in this situation.
|
* We kill the task with a SIGSEGV in this situation.
|
||||||
*/
|
*/
|
||||||
if (do_setcontext(new_ctx, regs, 0)) {
|
if (do_setcontext(new_ctx, regs, 0)) {
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -704,7 +704,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (__get_user_sigset(&set, &new_ctx->uc_sigmask)) {
|
if (__get_user_sigset(&set, &new_ctx->uc_sigmask)) {
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
set_current_blocked(&set);
|
set_current_blocked(&set);
|
||||||
|
@ -713,7 +713,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
if (__unsafe_restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) {
|
if (__unsafe_restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) {
|
||||||
user_read_access_end();
|
user_read_access_end();
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
user_read_access_end();
|
user_read_access_end();
|
||||||
|
|
|
@ -84,7 +84,7 @@ static void default_trap_handler(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
if (user_mode(regs)) {
|
if (user_mode(regs)) {
|
||||||
report_user_fault(regs, SIGSEGV, 0);
|
report_user_fault(regs, SIGSEGV, 0);
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
} else
|
} else
|
||||||
die(regs, "Unknown program exception");
|
die(regs, "Unknown program exception");
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ static void bad_segv(struct faultinfo fi, unsigned long ip)
|
||||||
|
|
||||||
void fatal_sigsegv(void)
|
void fatal_sigsegv(void)
|
||||||
{
|
{
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
do_signal(¤t->thread.regs);
|
do_signal(¤t->thread.regs);
|
||||||
/*
|
/*
|
||||||
* This is to tell gcc that we're not returning - do_signal
|
* This is to tell gcc that we're not returning - do_signal
|
||||||
|
|
|
@ -160,7 +160,7 @@ Efault_end:
|
||||||
user_access_end();
|
user_access_end();
|
||||||
Efault:
|
Efault:
|
||||||
pr_alert("could not access userspace vm86 info\n");
|
pr_alert("could not access userspace vm86 info\n");
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
goto exit_vm86;
|
goto exit_vm86;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1852,7 +1852,7 @@ out:
|
||||||
* SIGSEGV.
|
* SIGSEGV.
|
||||||
*/
|
*/
|
||||||
if (bprm->point_of_no_return && !fatal_signal_pending(current))
|
if (bprm->point_of_no_return && !fatal_signal_pending(current))
|
||||||
force_sigsegv(SIGSEGV);
|
force_fatal_sig(SIGSEGV);
|
||||||
|
|
||||||
out_unmark:
|
out_unmark:
|
||||||
current->fs->in_exec = 0;
|
current->fs->in_exec = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue