[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180601132239.4421-18-christian@brauner.io>
Date: Fri, 1 Jun 2018 15:22:39 +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 v2 17/17] 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>
---
v1->v2:
* unchanged
v0->v1:
* patch added
---
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 d5f9472a0935..be5b85567ca4 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -2305,7 +2305,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;
@@ -2315,7 +2315,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