mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
signal: make force_sigsegv() void
Patch series "signal: refactor some functions", v3. This series refactors a bunch of functions in signal.c to simplify parts of the code. The greatest single change is declaring the static do_sigpending() helper as void which makes it possible to remove a bunch of unnecessary checks in the syscalls later on. This patch (of 17): force_sigsegv() returned 0 unconditionally so it doesn't make sense to have it return at all. In addition, there are no callers that check force_sigsegv()'s return value. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Morris <[email protected]> Cc: Kees Cook <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephen Smalley <[email protected]> Cc: Al Viro <[email protected]> Cc: Oleg Nesterov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f423420c23
commit
52cba1a274
2 changed files with 3 additions and 6 deletions
|
|
@ -1458,8 +1458,7 @@ send_sig(int sig, struct task_struct *p, int priv)
|
|||
return send_sig_info(sig, __si_special(priv), p);
|
||||
}
|
||||
|
||||
void
|
||||
force_sig(int sig, struct task_struct *p)
|
||||
void force_sig(int sig, struct task_struct *p)
|
||||
{
|
||||
force_sig_info(sig, SEND_SIG_PRIV, p);
|
||||
}
|
||||
|
|
@ -1470,8 +1469,7 @@ force_sig(int sig, struct task_struct *p)
|
|||
* the problem was already a SIGSEGV, we'll want to
|
||||
* make sure we don't even try to deliver the signal..
|
||||
*/
|
||||
int
|
||||
force_sigsegv(int sig, struct task_struct *p)
|
||||
void force_sigsegv(int sig, struct task_struct *p)
|
||||
{
|
||||
if (sig == SIGSEGV) {
|
||||
unsigned long flags;
|
||||
|
|
@ -1480,7 +1478,6 @@ force_sigsegv(int sig, struct task_struct *p)
|
|||
spin_unlock_irqrestore(&p->sighand->siglock, flags);
|
||||
}
|
||||
force_sig(SIGSEGV, p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int force_sig_fault(int sig, int code, void __user *addr
|
||||
|
|
|
|||
Loading…
Reference in a new issue