Showing error 1600

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/sched.c
Line in file: 4089
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

4059
4060#endif
4061
4062DEFINE_PER_CPU(struct kernel_stat, kstat);
4063
4064EXPORT_PER_CPU_SYMBOL(kstat);
4065
4066/*
4067 * Return any ns on the sched_clock that have not yet been banked in
4068 * @p in case that task is currently running.
4069 */
4070unsigned long long task_delta_exec(struct task_struct *p)
4071{
4072        unsigned long flags;
4073        struct rq *rq;
4074        u64 ns = 0;
4075
4076        rq = task_rq_lock(p, &flags);
4077
4078        if (task_current(rq, p)) {
4079                u64 delta_exec;
4080
4081                update_rq_clock(rq);
4082                delta_exec = rq->clock - p->se.exec_start;
4083                if ((s64)delta_exec > 0)
4084                        ns = delta_exec;
4085        }
4086
4087        task_rq_unlock(rq, &flags);
4088
4089        return ns;
4090}
4091
4092/*
4093 * Account user cpu time to a process.
4094 * @p: the process that the cpu time gets accounted to
4095 * @cputime: the cpu time spent in user space since the last update
4096 */
4097void account_user_time(struct task_struct *p, cputime_t cputime)
4098{
4099        struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat;
Show full sources