Showing error 1413

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: 4569
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

4539        } while (unlikely(test_thread_flag(TIF_NEED_RESCHED)));
4540}
4541EXPORT_SYMBOL(preempt_schedule);
4542
4543/*
4544 * this is the entry point to schedule() from kernel preemption
4545 * off of irq context.
4546 * Note, that this is called and return with irqs disabled. This will
4547 * protect us against recursive calling from irq.
4548 */
4549asmlinkage void __sched preempt_schedule_irq(void)
4550{
4551        struct thread_info *ti = current_thread_info();
4552
4553        /* Catch callers which need to be fixed */
4554        BUG_ON(ti->preempt_count || !irqs_disabled());
4555
4556        do {
4557                add_preempt_count(PREEMPT_ACTIVE);
4558                local_irq_enable();
4559                schedule();
4560                local_irq_disable();
4561                sub_preempt_count(PREEMPT_ACTIVE);
4562
4563                /*
4564                 * Check again in case we missed a preemption opportunity
4565                 * between schedule and now.
4566                 */
4567                barrier();
4568        } while (unlikely(test_thread_flag(TIF_NEED_RESCHED)));
4569}
4570
4571#endif /* CONFIG_PREEMPT */
4572
4573int default_wake_function(wait_queue_t *curr, unsigned mode, int sync,
4574                          void *key)
4575{
4576        return try_to_wake_up(curr->private, mode, sync);
4577}
4578EXPORT_SYMBOL(default_wake_function);
4579
Show full sources