Showing error 864

User: Jiri Slaby
Error type: Resource Leak
Error type description: The code omits to put the resource to the system for reuse
File location: kernel/spinlock.c
Line in file: 111
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:40:13 UTC


Source:

 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}
106EXPORT_SYMBOL(_spin_lock_irq);
107
108void __lockfunc _spin_lock_bh(spinlock_t *lock)
109{
110        local_bh_disable();
111        preempt_disable();
112        spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
113        LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
114}
115EXPORT_SYMBOL(_spin_lock_bh);
116
117unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
118{
119        unsigned long flags;
120
121        local_irq_save(flags);
Show full sources