978
979
980 sigaddset(&t->pending.signal, SIGKILL);
981 signal_wake_up(t, 1);
982 }
983}
984
985int __fatal_signal_pending(struct task_struct *tsk)
986{
987 return sigismember(&tsk->pending.signal, SIGKILL);
988}
989EXPORT_SYMBOL(__fatal_signal_pending);
990
991struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags)
992{
993 struct sighand_struct *sighand;
994
995 rcu_read_lock();
996 for (;;) {
997 sighand = rcu_dereference(tsk->sighand);
998 if (unlikely(sighand == NULL))
999 break;
1000
1001 spin_lock_irqsave(&sighand->siglock, *flags);
1002 if (likely(sighand == tsk->sighand))
1003 break;
1004 spin_unlock_irqrestore(&sighand->siglock, *flags);
1005 }
1006 rcu_read_unlock();
1007
1008 return sighand;
1009}
1010
1011int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p)
1012{
1013 unsigned long flags;
1014 int ret;
1015
1016 ret = check_kill_permission(sig, info, p);
1017
1018 if (!ret && sig) {