Skip to content

Commit e21294a

Browse files
committed
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 <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Link: https://lkml.kernel.org/r/877de7jrev.fsf@disp2133 Signed-off-by: "Eric W. Biederman" <[email protected]>
1 parent 0fdc0c4 commit e21294a

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

arch/arc/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ int elf_check_arch(const struct elf32_hdr *x)
294294
eflags = x->e_flags;
295295
if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) {
296296
pr_err("ABI mismatch - you need newer toolchain\n");
297-
force_sigsegv(SIGSEGV);
297+
force_fatal_sig(SIGSEGV);
298298
return 0;
299299
}
300300

arch/m68k/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ asmlinkage void set_esp0(unsigned long ssp)
11501150
*/
11511151
asmlinkage void fpsp040_die(void)
11521152
{
1153-
force_sigsegv(SIGSEGV);
1153+
force_fatal_sig(SIGSEGV);
11541154
}
11551155

11561156
#ifdef CONFIG_M68KFPU_EMU

arch/powerpc/kernel/signal_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
10631063
* We kill the task with a SIGSEGV in this situation.
10641064
*/
10651065
if (do_setcontext(new_ctx, regs, 0)) {
1066-
force_sigsegv(SIGSEGV);
1066+
force_fatal_sig(SIGSEGV);
10671067
return -EFAULT;
10681068
}
10691069

arch/powerpc/kernel/signal_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
704704
*/
705705

706706
if (__get_user_sigset(&set, &new_ctx->uc_sigmask)) {
707-
force_sigsegv(SIGSEGV);
707+
force_fatal_sig(SIGSEGV);
708708
return -EFAULT;
709709
}
710710
set_current_blocked(&set);
@@ -713,7 +713,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
713713
return -EFAULT;
714714
if (__unsafe_restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) {
715715
user_read_access_end();
716-
force_sigsegv(SIGSEGV);
716+
force_fatal_sig(SIGSEGV);
717717
return -EFAULT;
718718
}
719719
user_read_access_end();

arch/s390/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static void default_trap_handler(struct pt_regs *regs)
8484
{
8585
if (user_mode(regs)) {
8686
report_user_fault(regs, SIGSEGV, 0);
87-
force_sigsegv(SIGSEGV);
87+
force_fatal_sig(SIGSEGV);
8888
} else
8989
die(regs, "Unknown program exception");
9090
}

arch/um/kernel/trap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static void bad_segv(struct faultinfo fi, unsigned long ip)
158158

159159
void fatal_sigsegv(void)
160160
{
161-
force_sigsegv(SIGSEGV);
161+
force_fatal_sig(SIGSEGV);
162162
do_signal(&current->thread.regs);
163163
/*
164164
* This is to tell gcc that we're not returning - do_signal

arch/x86/kernel/vm86_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void save_v86_state(struct kernel_vm86_regs *regs, int retval)
160160
user_access_end();
161161
Efault:
162162
pr_alert("could not access userspace vm86 info\n");
163-
force_sigsegv(SIGSEGV);
163+
force_fatal_sig(SIGSEGV);
164164
goto exit_vm86;
165165
}
166166

fs/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ static int bprm_execve(struct linux_binprm *bprm,
18521852
* SIGSEGV.
18531853
*/
18541854
if (bprm->point_of_no_return && !fatal_signal_pending(current))
1855-
force_sigsegv(SIGSEGV);
1855+
force_fatal_sig(SIGSEGV);
18561856

18571857
out_unmark:
18581858
current->fs->in_exec = 0;

0 commit comments

Comments
 (0)