]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
signal: make get_signal() return bool
authorChristian Brauner <christian@brauner.io>
Wed, 22 Aug 2018 05:00:54 +0000 (22:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 17:52:51 +0000 (10:52 -0700)
make get_signal() already behaves like a boolean function.  Let's actually
declare it as such too.

Link: http://lkml.kernel.org/r/20180602103653.18181-18-christian@brauner.io
Signed-off-by: Christian Brauner <christian@brauner.io>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Morris <james.morris@microsoft.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/signal.h
kernel/signal.c

index fa23cae66758b6c41ddbb1889d2fd75b47f5294f..e3d9e0640e6ec44332b4a6c4eacd158fc3d35259 100644 (file)
@@ -265,7 +265,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);
index 9f9b4183178e2bee8b420fdc70c2c50092d6a141..786bacc60649d26448b9eabb2fba0bfd1cf83934 100644 (file)
@@ -2287,7 +2287,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;
@@ -2297,7 +2297,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.