mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
recalc_sigpending_tsk fixes
Steve Hawkes discovered a problem where recalc_sigpending_tsk was called in do_sigaction but no signal_wake_up call was made, preventing later signals from waking up blocked threads with TIF_SIGPENDING already set. In fact, the few other calls to recalc_sigpending_tsk outside the signals code are also subject to this problem in other race conditions. This change makes recalc_sigpending_tsk private to the signals code. It changes the outside calls, as well as do_sigaction, to use the new recalc_sigpending_and_wake instead. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: <Steve.Hawkes@motorola.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3c6df2a917
commit
7bb44adef3
4 changed files with 28 additions and 17 deletions
|
@ -1616,11 +1616,13 @@ static inline int lock_need_resched(spinlock_t *lock)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Reevaluate whether the task has signals pending delivery.
|
||||
This is required every time the blocked sigset_t changes.
|
||||
callers must hold sighand->siglock. */
|
||||
|
||||
extern FASTCALL(void recalc_sigpending_tsk(struct task_struct *t));
|
||||
/*
|
||||
* Reevaluate whether the task has signals pending delivery.
|
||||
* Wake the task if so.
|
||||
* This is required every time the blocked sigset_t changes.
|
||||
* callers must hold sighand->siglock.
|
||||
*/
|
||||
extern void recalc_sigpending_and_wake(struct task_struct *t);
|
||||
extern void recalc_sigpending(void);
|
||||
|
||||
extern void signal_wake_up(struct task_struct *t, int resume_stopped);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue