Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106221
b: refs/heads/master
c: b787f7b
h: refs/heads/master
i:
  106219: 4678044
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Jul 26, 2008
1 parent 142878a commit 7f1c979
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b2a1ff64afbadac842bbc58c5166962cf4f7664
refs/heads/master: b787f7ba677840da16a2228c16571ce8a1fcb799
14 changes: 14 additions & 0 deletions trunk/include/linux/tracehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,20 @@ static inline int tracehook_consider_fatal_signal(struct task_struct *task,
return (task_ptrace(task) & PT_PTRACED) != 0;
}

/**
* tracehook_force_sigpending - let tracing force signal_pending(current) on
*
* Called when recomputing our signal_pending() flag. Return nonzero
* to force the signal_pending() flag on, so that tracehook_get_signal()
* will be called before the next return to user mode.
*
* Called with @current->sighand->siglock held.
*/
static inline int tracehook_force_sigpending(void)
{
return 0;
}

/**
* tracehook_get_signal - deliver synthetic signal to traced task
* @task: @current
Expand Down
4 changes: 3 additions & 1 deletion trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ void recalc_sigpending_and_wake(struct task_struct *t)

void recalc_sigpending(void)
{
if (!recalc_sigpending_tsk(current) && !freezing(current))
if (unlikely(tracehook_force_sigpending()))
set_thread_flag(TIF_SIGPENDING);
else if (!recalc_sigpending_tsk(current) && !freezing(current))
clear_thread_flag(TIF_SIGPENDING);

}
Expand Down

0 comments on commit 7f1c979

Please sign in to comment.