User: | Jiri Slaby |
Error type: | Double Lock |
Error type description: | Some lock is locked twice unintentionally in a sequence |
File location: | kernel/signal.c |
Line in file: | 1741 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
Undetermined 1 Clang Static Analyzer (3.0) |
Entered: | 2011-11-07 22:19:59 UTC |
1711 info->si_code = SI_USER; 1712 info->si_pid = task_pid_vnr(current->parent); 1713 info->si_uid = current->parent->uid; 1714 } 1715 1716 /* If the (new) signal is now blocked, requeue it. */ 1717 if (sigismember(¤t->blocked, signr)) { 1718 specific_send_sig_info(signr, info, current); 1719 signr = 0; 1720 } 1721 1722 return signr; 1723} 1724 1725int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, 1726 struct pt_regs *regs, void *cookie) 1727{ 1728 struct sighand_struct *sighand = current->sighand; 1729 struct signal_struct *signal = current->signal; 1730 int signr; 1731 1732relock: 1733 /* 1734 * We'll jump back here after any time we were stopped in TASK_STOPPED. 1735 * While in TASK_STOPPED, we were considered "frozen enough". 1736 * Now that we woke up, it's crucial if we're supposed to be 1737 * frozen that we freeze now before running anything substantial. 1738 */ 1739 try_to_freeze(); 1740 1741 spin_lock_irq(&sighand->siglock); 1742 /* 1743 * Every stopped thread goes here after wakeup. Check to see if 1744 * we should notify the parent, prepare_signal(SIGCONT) encodes 1745 * the CLD_ si_code into SIGNAL_CLD_MASK bits. 1746 */ 1747 if (unlikely(signal->flags & SIGNAL_CLD_MASK)) { 1748 int why = (signal->flags & SIGNAL_STOP_CONTINUED) 1749 ? CLD_CONTINUED : CLD_STOPPED; 1750 signal->flags &= ~SIGNAL_CLD_MASK; 1751 spin_unlock_irq(&sighand->siglock);