The patch titled Subject: signal: make force_sigsegv() void has been added to the -mm tree. Its filename is signal-make-force_sigsegv-void.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/signal-make-force_sigsegv-void.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/signal-make-force_sigsegv-void.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Christian Brauner <christian@xxxxxxxxxx> Subject: 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/20180602103653.18181-2-christian@xxxxxxxxxx Signed-off-by: Christian Brauner <christian@xxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Eric W. Biederman <ebiederm@xxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: James Morris <james.morris@xxxxxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Stephen Smalley <sds@xxxxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/sched/signal.h | 2 +- kernel/signal.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff -puN include/linux/sched/signal.h~signal-make-force_sigsegv-void include/linux/sched/signal.h --- a/include/linux/sched/signal.h~signal-make-force_sigsegv-void +++ a/include/linux/sched/signal.h @@ -317,7 +317,7 @@ int force_sig_pkuerr(void __user *addr, int force_sig_ptrace_errno_trap(int errno, void __user *addr); extern int send_sig_info(int, struct siginfo *, struct task_struct *); -extern int force_sigsegv(int, struct task_struct *); +extern void force_sigsegv(int sig, struct task_struct *p); extern int force_sig_info(int, struct siginfo *, struct task_struct *); extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); diff -puN kernel/signal.c~signal-make-force_sigsegv-void kernel/signal.c --- a/kernel/signal.c~signal-make-force_sigsegv-void +++ a/kernel/signal.c @@ -1458,8 +1458,7 @@ send_sig(int sig, struct task_struct *p, 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_struc spin_unlock_irqrestore(&p->sighand->siglock, flags); } force_sig(SIGSEGV, p); - return 0; } int force_sig_fault(int sig, int code, void __user *addr _ Patches currently in -mm which might be from christian@xxxxxxxxxx are signal-make-force_sigsegv-void.patch signal-make-kill_as_cred_perm-return-bool.patch signal-make-may_ptrace_stop-return-bool.patch signal-make-do_sigpending-void.patch signal-simplify-rt_sigaction.patch signal-make-kill_ok_by_cred-return-bool.patch signal-make-sig_handler_ignored-return-bool.patch signal-make-sig_task_ignored-return-bool.patch signal-make-sig_ignored-return-bool.patch signal-make-has_pending_signals-return-bool.patch signal-make-recalc_sigpending_tsk-return-bool.patch signal-make-unhandled_signal-return-bool.patch signal-make-flush_sigqueue_mask-void.patch signal-make-wants_signal-return-bool.patch signal-make-legacy_queue-return-bool.patch signal-make-sigkill_pending-return-bool.patch signal-make-get_signal-return-bool.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html