Showing error 1010

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: 4509
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

4479
4480        if (unlikely(!rq->nr_running))
4481                idle_balance(cpu, rq);
4482
4483        prev->sched_class->put_prev_task(rq, prev);
4484        next = pick_next_task(rq, prev);
4485
4486        if (likely(prev != next)) {
4487                sched_info_switch(prev, next);
4488
4489                rq->nr_switches++;
4490                rq->curr = next;
4491                ++*switch_count;
4492
4493                context_switch(rq, prev, next); /* unlocks the rq */
4494                /*
4495                 * the context switch might have flipped the stack from under
4496                 * us, hence refresh the local variables.
4497                 */
4498                cpu = smp_processor_id();
4499                rq = cpu_rq(cpu);
4500        } else
4501                spin_unlock_irq(&rq->lock);
4502
4503        if (unlikely(reacquire_kernel_lock(current) < 0))
4504                goto need_resched_nonpreemptible;
4505
4506        preempt_enable_no_resched();
4507        if (unlikely(test_thread_flag(TIF_NEED_RESCHED)))
4508                goto need_resched;
4509}
4510EXPORT_SYMBOL(schedule);
4511
4512#ifdef CONFIG_PREEMPT
4513/*
4514 * this is the entry point to schedule() from in-kernel preemption
4515 * off of preempt_enable. Kernel preemptions off return from interrupt
4516 * occur there and call schedule directly.
4517 */
4518asmlinkage void __sched preempt_schedule(void)
4519{
Show full sources