Showing error 861

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: 289
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:40:13 UTC


Source:

259        /* Careful: we must exclude softirqs too, hence the        */        \
260        /* irq-disabling. We use the generic preemption-aware        */        \
261        /* function:                                                */        \
262        /**/                                                                \
263        flags = _##op##_lock_irqsave(lock);                                \
264        local_bh_disable();                                                \
265        local_irq_restore(flags);                                        \
266}                                                                        \
267                                                                        \
268EXPORT_SYMBOL(_##op##_lock_bh)
269
270/*
271 * Build preemption-friendly versions of the following
272 * lock-spinning functions:
273 *
274 *         _[spin|read|write]_lock()
275 *         _[spin|read|write]_lock_irq()
276 *         _[spin|read|write]_lock_irqsave()
277 *         _[spin|read|write]_lock_bh()
278 */
279BUILD_LOCK_OPS(spin, spinlock);
280BUILD_LOCK_OPS(read, rwlock);
281BUILD_LOCK_OPS(write, rwlock);
282
283#endif /* CONFIG_PREEMPT */
284
285#ifdef CONFIG_DEBUG_LOCK_ALLOC
286
287void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
288{
289        preempt_disable();
290        spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_);
291        LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
292}
293EXPORT_SYMBOL(_spin_lock_nested);
294
295unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass)
296{
297        unsigned long flags;
298
299        local_irq_save(flags);
Show full sources