[PATCH v2 17/17] signal: make get_signal() return bool

From: Christian Brauner
Date: Fri Jun 01 2018 - 09:23:26 EST


make get_signal() already behaves like a boolean function. Let's actually
declare it as such too.

Signed-off-by: Christian Brauner <christian@xxxxxxxxxx>
---
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