|
@@ -3068,16 +3068,16 @@ COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinfo,
|
|
|
|
|
|
int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
|
|
int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
|
|
{
|
|
{
|
|
- struct task_struct *t = current;
|
|
|
|
|
|
+ struct task_struct *p = current, *t;
|
|
struct k_sigaction *k;
|
|
struct k_sigaction *k;
|
|
sigset_t mask;
|
|
sigset_t mask;
|
|
|
|
|
|
if (!valid_signal(sig) || sig < 1 || (act && sig_kernel_only(sig)))
|
|
if (!valid_signal(sig) || sig < 1 || (act && sig_kernel_only(sig)))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- k = &t->sighand->action[sig-1];
|
|
|
|
|
|
+ k = &p->sighand->action[sig-1];
|
|
|
|
|
|
- spin_lock_irq(¤t->sighand->siglock);
|
|
|
|
|
|
+ spin_lock_irq(&p->sighand->siglock);
|
|
if (oact)
|
|
if (oact)
|
|
*oact = *k;
|
|
*oact = *k;
|
|
|
|
|
|
@@ -3096,17 +3096,16 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
|
|
* (for example, SIGCHLD), shall cause the pending signal to
|
|
* (for example, SIGCHLD), shall cause the pending signal to
|
|
* be discarded, whether or not it is blocked"
|
|
* be discarded, whether or not it is blocked"
|
|
*/
|
|
*/
|
|
- if (sig_handler_ignored(sig_handler(t, sig), sig)) {
|
|
|
|
|
|
+ if (sig_handler_ignored(sig_handler(p, sig), sig)) {
|
|
sigemptyset(&mask);
|
|
sigemptyset(&mask);
|
|
sigaddset(&mask, sig);
|
|
sigaddset(&mask, sig);
|
|
- flush_sigqueue_mask(&mask, &t->signal->shared_pending);
|
|
|
|
- do {
|
|
|
|
|
|
+ flush_sigqueue_mask(&mask, &p->signal->shared_pending);
|
|
|
|
+ for_each_thread(p, t)
|
|
flush_sigqueue_mask(&mask, &t->pending);
|
|
flush_sigqueue_mask(&mask, &t->pending);
|
|
- } while_each_thread(current, t);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- spin_unlock_irq(¤t->sighand->siglock);
|
|
|
|
|
|
+ spin_unlock_irq(&p->sighand->siglock);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|