From: Christian Brauner <christian@brauner.io>
To: linux-kernel@vger.kernel.org
Cc: ebiederm@xmission.com, gregkh@linuxfoundation.org,
mingo@kernel.org, james.morris@microsoft.com,
keescook@chromium.org, peterz@infradead.org, sds@tycho.nsa.gov,
viro@zeniv.linux.org.uk, akpm@linux-foundation.org,
oleg@redhat.com, Christian Brauner <christian@brauner.io>
Subject: [PATCH v3 01/17] signal: make force_sigsegv() void
Date: Sat, 2 Jun 2018 12:36:37 +0200 [thread overview]
Message-ID: <20180602103653.18181-2-christian@brauner.io> (raw)
In-Reply-To: <20180602103653.18181-1-christian@brauner.io>
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.
Signed-off-by: Christian Brauner <christian@brauner.io>
---
v2->v3:
* unchanged
v1->v2:
* unchanged
v0->v1:
* unchanged
---
include/linux/sched/signal.h | 2 +-
kernel/signal.c | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h
index 113d1ad1ced7..e138ac16c650 100644
--- a/include/linux/sched/signal.h
+++ b/include/linux/sched/signal.h
@@ -314,7 +314,7 @@ int force_sig_pkuerr(void __user *addr, u32 pkey);
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 --git a/kernel/signal.c b/kernel/signal.c
index 9c33163a6165..c756008d589e 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1468,8 +1468,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);
}
@@ -1480,8 +1479,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;
@@ -1490,7 +1488,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
--
2.17.0
next prev parent reply other threads:[~2018-06-02 10:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-02 10:36 [PATCH v3 00/17] signal: refactor some functions Christian Brauner
2018-06-02 10:36 ` Christian Brauner [this message]
2018-06-02 10:36 ` [PATCH v3 02/17] signal: make kill_as_cred_perm() return bool Christian Brauner
2018-06-02 10:36 ` [PATCH v3 03/17] signal: make may_ptrace_stop() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 04/17] signal: make do_sigpending() void Christian Brauner
2018-06-02 10:36 ` [PATCH v3 05/17] signal: simplify rt_sigaction() Christian Brauner
2018-06-02 10:36 ` [PATCH v3 06/17] signal: make kill_ok_by_cred() return bool Christian Brauner
2018-06-02 10:36 ` [PATCH v3 07/17] signal: make sig_handler_ignored() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 08/17] signal: make sig_task_ignored() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 09/17] signal: make sig_ignored() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 10/17] signal: make has_pending_signals() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 11/17] signal: make recalc_sigpending_tsk() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 12/17] signal: make unhandled_signal() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 13/17] signal: make flush_sigqueue_mask() void Christian Brauner
2018-06-02 10:36 ` [PATCH v3 14/17] signal: make wants_signal() return bool Christian Brauner
2018-06-02 10:36 ` [PATCH v3 15/17] signal: make legacy_queue() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 16/17] signal: make sigkill_pending() " Christian Brauner
2018-06-02 10:36 ` [PATCH v3 17/17] signal: make get_signal() " Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180602103653.18181-2-christian@brauner.io \
--to=christian@brauner.io \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.morris@microsoft.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sds@tycho.nsa.gov \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®