Skip to content

Commit

Permalink
signal: make get_signal() return bool
Browse files Browse the repository at this point in the history
make get_signal() already behaves like a boolean function.  Let's actually
declare it as such too.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Eric W. Biederman <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Morris <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephen Smalley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
brauner authored and torvalds committed Aug 22, 2018
1 parent f99e9d8 commit 20ab721
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/linux/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down

0 comments on commit 20ab721

Please sign in to comment.