Showing error 611

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: kernel/user.c
Line in file: 326
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

296                remove_user = 1;
297                spin_unlock_irqrestore(&uidhash_lock, flags);
298        } else {
299                local_irq_restore(flags);
300        }
301
302        if (!remove_user)
303                goto done;
304
305        kobject_uevent(&up->kobj, KOBJ_REMOVE);
306        kobject_del(&up->kobj);
307        kobject_put(&up->kobj);
308
309        sched_destroy_user(up);
310        key_put(up->uid_keyring);
311        key_put(up->session_keyring);
312        kmem_cache_free(uid_cachep, up);
313
314done:
315        uids_mutex_unlock();
316}
317
318/* IRQs are disabled and uidhash_lock is held upon function entry.
319 * IRQ state (as stored in flags) is restored and uidhash_lock released
320 * upon function exit.
321 */
322static inline void free_user(struct user_struct *up, unsigned long flags)
323{
324        /* restore back the count */
325        atomic_inc(&up->__count);
326        spin_unlock_irqrestore(&uidhash_lock, flags);
327
328        INIT_WORK(&up->work, remove_user_sysfs_dir);
329        schedule_work(&up->work);
330}
331
332#else        /* CONFIG_USER_SCHED && CONFIG_SYSFS */
333
334int uids_sysfs_init(void) { return 0; }
335static inline int uids_user_create(struct user_struct *up) { return 0; }
336static inline void uids_mutex_lock(void) { }
Show full sources