[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180528215355.16119-21-christian@brauner.io>
Date: Mon, 28 May 2018 23:53:55 +0200
From: Christian Brauner <christian@...uner.io>
To: linux-kernel@...r.kernel.org
Cc: ebiederm@...ssion.com, gregkh@...uxfoundation.org,
mingo@...nel.org, james.morris@...rosoft.com,
keescook@...omium.org, peterz@...radead.org, sds@...ho.nsa.gov,
viro@...iv.linux.org.uk, akpm@...ux-foundation.org,
oleg@...hat.com, Christian Brauner <christian@...uner.io>
Subject: [PATCH v1 20/20] signal: make get_signal() return bool
make get_signal() already behaves like a boolean function. Let's actually
declare it as such too.
Signed-off-by: Christian Brauner <christian@...uner.io>
---
v0->v1:
* patch introduced
---
include/linux/signal.h | 2 +-
kernel/signal.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 1145d7061ed9..97d5ff809716 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -262,7 +262,7 @@ extern void set_current_blocked(sigset_t *);
extern void __set_current_blocked(const sigset_t *);
extern int show_unhandled_signals;
-extern int get_signal(struct ksignal *ksig);
+extern bool get_signal(struct ksignal *ksig);
extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping);
extern void exit_signals(struct task_struct *tsk);
extern void kernel_sigaction(int, __sighandler_t);
diff --git a/kernel/signal.c b/kernel/signal.c
index a4787c90faab..e3b0719986a2 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2311,7 +2311,7 @@ static int ptrace_signal(int signr, siginfo_t *info)
return signr;
}
-int get_signal(struct ksignal *ksig)
+bool get_signal(struct ksignal *ksig)
{
struct sighand_struct *sighand = current->sighand;
struct signal_struct *signal = current->signal;
@@ -2321,7 +2321,7 @@ int get_signal(struct ksignal *ksig)
task_work_run();
if (unlikely(uprobe_deny_signal()))
- return 0;
+ return false;
/*
* Do this once, we can't return to user-mode if freezing() == T.
--
2.17.0
Powered by blists - more mailing lists