Showing error 1036

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: kernel/signal.c
Line in file: 1589
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

1559                 * By the time we got the lock, our tracer went away.
1560                 * Don't drop the lock yet, another tracer may come.
1561                 */
1562                __set_current_state(TASK_RUNNING);
1563                if (clear_code)
1564                        current->exit_code = 0;
1565                read_unlock(&tasklist_lock);
1566        }
1567
1568        /*
1569         * While in TASK_TRACED, we were considered "frozen enough".
1570         * Now that we woke up, it's crucial if we're supposed to be
1571         * frozen that we freeze now before running anything substantial.
1572         */
1573        try_to_freeze();
1574
1575        /*
1576         * We are back.  Now reacquire the siglock before touching
1577         * last_siginfo, so that we are sure to have synchronized with
1578         * any signal-sending on another CPU that wants to examine it.
1579         */
1580        spin_lock_irq(&current->sighand->siglock);
1581        current->last_siginfo = NULL;
1582
1583        /*
1584         * Queued signals ignored us while we were stopped for tracing.
1585         * So check for any that we should take before resuming user mode.
1586         * This sets TIF_SIGPENDING, but never clears it.
1587         */
1588        recalc_sigpending_tsk(current);
1589}
1590
1591void ptrace_notify(int exit_code)
1592{
1593        siginfo_t info;
1594
1595        BUG_ON((exit_code & (0x7f | ~0xffff)) != SIGTRAP);
1596
1597        memset(&info, 0, sizeof info);
1598        info.si_signo = SIGTRAP;
1599        info.si_code = exit_code;
Show full sources