Showing error 1423

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/spinlock.c
Line in file: 95
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 65 * even on CONFIG_PREEMPT, because lockdep assumes that interrupts are
 66 * not re-enabled during lock-acquire (which the preempt-spin-ops do):
 67 */
 68#if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)
 69
 70void __lockfunc _read_lock(rwlock_t *lock)
 71{
 72        preempt_disable();
 73        rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_);
 74        LOCK_CONTENDED(lock, _raw_read_trylock, _raw_read_lock);
 75}
 76EXPORT_SYMBOL(_read_lock);
 77
 78unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
 79{
 80        unsigned long flags;
 81
 82        local_irq_save(flags);
 83        preempt_disable();
 84        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
 85        /*
 86         * On lockdep we dont want the hand-coded irq-enable of
 87         * _raw_spin_lock_flags() code, because lockdep assumes
 88         * that interrupts are not re-enabled during lock-acquire:
 89         */
 90#ifdef CONFIG_LOCKDEP
 91        LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
 92#else
 93        _raw_spin_lock_flags(lock, &flags);
 94#endif
 95        return flags;
 96}
 97EXPORT_SYMBOL(_spin_lock_irqsave);
 98
 99void __lockfunc _spin_lock_irq(spinlock_t *lock)
100{
101        local_irq_disable();
102        preempt_disable();
103        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
104        LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
105}
Show full sources