signal: Explicitly call force_sig_fault on current
Update the calls of force_sig_fault that pass in a variable that is set to current earlier to explicitly use current. This is to make the next change that removes the task parameter from force_sig_fault easier to verify. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
Родитель
ec74e9205e
Коммит
351b6825b3
|
@ -50,7 +50,7 @@ unhandled_exception(const char *str, struct pt_regs *regs,
|
|||
|
||||
tsk->thread.fault_address = (__force unsigned int)addr;
|
||||
|
||||
force_sig_fault(signo, si_code, addr, tsk);
|
||||
force_sig_fault(signo, si_code, addr, current);
|
||||
|
||||
} else {
|
||||
/* If not due to copy_(to|from)_user, we are doomed */
|
||||
|
|
|
@ -202,7 +202,7 @@ bad_area_nosemaphore:
|
|||
/* User mode accesses just cause a SIGSEGV */
|
||||
if (user_mode(regs)) {
|
||||
tsk->thread.fault_address = address;
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, current);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -237,5 +237,5 @@ do_sigbus:
|
|||
goto no_context;
|
||||
|
||||
tsk->thread.fault_address = address;
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, current);
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,
|
|||
tsk->thread.address = addr;
|
||||
tsk->thread.error_code = fsr;
|
||||
tsk->thread.trap_no = 14;
|
||||
force_sig_fault(sig, code, (void __user *)addr, tsk);
|
||||
force_sig_fault(sig, code, (void __user *)addr, current);
|
||||
}
|
||||
|
||||
void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
|
|
|
@ -223,7 +223,7 @@ bad_area_nosemaphore:
|
|||
pr_cont("\n");
|
||||
}
|
||||
current->thread.trap_nr = (regs->cp0_cause >> 2) & 0x1f;
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, current);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ do_sigbus:
|
|||
#endif
|
||||
current->thread.trap_nr = (regs->cp0_cause >> 2) & 0x1f;
|
||||
tsk->thread.cp0_badvaddr = address;
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, current);
|
||||
|
||||
return;
|
||||
#ifndef CONFIG_64BIT
|
||||
|
|
|
@ -263,7 +263,7 @@ static void send_sigtrap(struct pt_regs *regs, int error_code, int si_code)
|
|||
tsk->thread.error_code = error_code;
|
||||
|
||||
force_sig_fault(SIGTRAP, si_code,
|
||||
(void __user *)instruction_pointer(regs), tsk);
|
||||
(void __user *)instruction_pointer(regs), current);
|
||||
}
|
||||
|
||||
void do_debug_trap(unsigned long entry, unsigned long addr,
|
||||
|
|
|
@ -271,7 +271,7 @@ bad_area_nosemaphore:
|
|||
tsk->thread.address = addr;
|
||||
tsk->thread.error_code = error_code;
|
||||
tsk->thread.trap_no = entry;
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)addr, tsk);
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)addr, current);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ do_sigbus:
|
|||
tsk->thread.address = addr;
|
||||
tsk->thread.error_code = error_code;
|
||||
tsk->thread.trap_no = entry;
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)addr, tsk);
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)addr, current);
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ bad_area_nosemaphore:
|
|||
/* User mode accesses just cause a SIGSEGV */
|
||||
|
||||
if (user_mode(regs)) {
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, current);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ do_sigbus:
|
|||
* Send a sigbus, regardless of whether we were in kernel
|
||||
* or user mode.
|
||||
*/
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, current);
|
||||
|
||||
/* Kernel mode? Handle exceptions or die */
|
||||
if (!user_mode(regs))
|
||||
|
|
|
@ -76,7 +76,7 @@ void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
|
|||
show_regs(regs);
|
||||
}
|
||||
|
||||
force_sig_fault(signo, code, (void __user *)addr, tsk);
|
||||
force_sig_fault(signo, code, (void __user *)addr, current);
|
||||
}
|
||||
|
||||
static void do_trap_error(struct pt_regs *regs, int signo, int code,
|
||||
|
|
|
@ -560,7 +560,7 @@ static int ieee_fpe_handler(struct pt_regs *regs)
|
|||
task_thread_info(tsk)->status |= TS_USEDFPU;
|
||||
} else {
|
||||
force_sig_fault(SIGFPE, FPE_FLTINV,
|
||||
(void __user *)regs->pc, tsk);
|
||||
(void __user *)regs->pc, current);
|
||||
}
|
||||
|
||||
regs->pc = nextpc;
|
||||
|
|
|
@ -124,7 +124,7 @@ static void __do_user_fault(unsigned long addr, unsigned int fsr,
|
|||
tsk->thread.address = addr;
|
||||
tsk->thread.error_code = fsr;
|
||||
tsk->thread.trap_no = 14;
|
||||
force_sig_fault(sig, code, (void __user *)addr, tsk);
|
||||
force_sig_fault(sig, code, (void __user *)addr, current);
|
||||
}
|
||||
|
||||
void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
|
|
|
@ -1369,7 +1369,7 @@ void send_sigtrap(struct pt_regs *regs, int error_code, int si_code)
|
|||
|
||||
/* Send us the fake SIGTRAP */
|
||||
force_sig_fault(SIGTRAP, si_code,
|
||||
user_mode(regs) ? (void __user *)regs->ip : NULL, tsk);
|
||||
user_mode(regs) ? (void __user *)regs->ip : NULL, current);
|
||||
}
|
||||
|
||||
void user_single_step_report(struct pt_regs *regs)
|
||||
|
|
|
@ -256,7 +256,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
|
|||
if (!sicode)
|
||||
force_sig(signr);
|
||||
else
|
||||
force_sig_fault(signr, sicode, addr, tsk);
|
||||
force_sig_fault(signr, sicode, addr, current);
|
||||
}
|
||||
NOKPROBE_SYMBOL(do_trap);
|
||||
|
||||
|
@ -856,7 +856,7 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr)
|
|||
return;
|
||||
|
||||
force_sig_fault(SIGFPE, si_code,
|
||||
(void __user *)uprobe_get_trap_addr(regs), task);
|
||||
(void __user *)uprobe_get_trap_addr(regs), current);
|
||||
}
|
||||
|
||||
dotraplinkage void do_coprocessor_error(struct pt_regs *regs, long error_code)
|
||||
|
|
|
@ -277,7 +277,7 @@ static void force_sig_info_umip_fault(void __user *addr, struct pt_regs *regs)
|
|||
tsk->thread.error_code = X86_PF_USER | X86_PF_WRITE;
|
||||
tsk->thread.trap_nr = X86_TRAP_PF;
|
||||
|
||||
force_sig_fault(SIGSEGV, SEGV_MAPERR, addr, tsk);
|
||||
force_sig_fault(SIGSEGV, SEGV_MAPERR, addr, current);
|
||||
|
||||
if (!(show_unhandled_signals && unhandled_signal(tsk, SIGSEGV)))
|
||||
return;
|
||||
|
|
|
@ -757,7 +757,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
|
|||
|
||||
/* XXX: hwpoison faults will set the wrong code. */
|
||||
force_sig_fault(signal, si_code, (void __user *)address,
|
||||
tsk);
|
||||
current);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -918,7 +918,7 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
|
|||
if (si_code == SEGV_PKUERR)
|
||||
force_sig_pkuerr((void __user *)address, pkey);
|
||||
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGSEGV, si_code, (void __user *)address, current);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1044,7 +1044,7 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, tsk);
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, current);
|
||||
}
|
||||
|
||||
static noinline void
|
||||
|
|
Загрузка…
Ссылка в новой задаче