Showing error 619

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


Source:

341                        return -ENOENT;
342                else if (!IS_ROOT(dentry->d_parent))
343                        return -ENOENT;
344        }
345
346        name = kmalloc(NAME_MAX + 1, GFP_KERNEL);
347        if (!name)
348                return -ENOMEM;
349
350        /* If this is a direct mount request create a dummy name */
351        if (IS_ROOT(dentry) && sbi->type & AUTOFS_TYPE_TRIGGER)
352                qstr.len = sprintf(name, "%p", dentry);
353        else {
354                qstr.len = autofs4_getpath(sbi, dentry, &name);
355                if (!qstr.len) {
356                        kfree(name);
357                        return -ENOENT;
358                }
359        }
360        qstr.name = name;
361        qstr.hash = full_name_hash(name, qstr.len);
362
363        if (mutex_lock_interruptible(&sbi->wq_mutex)) {
364                kfree(qstr.name);
365                return -EINTR;
366        }
367
368        ret = validate_request(&wq, sbi, &qstr, dentry, notify);
369        if (ret <= 0) {
370                if (ret == 0)
371                        mutex_unlock(&sbi->wq_mutex);
372                kfree(qstr.name);
373                return ret;
374        }
375
376        if (!wq) {
377                /* Create a new wait queue */
378                wq = kmalloc(sizeof(struct autofs_wait_queue),GFP_KERNEL);
379                if (!wq) {
380                        kfree(qstr.name);
381                        mutex_unlock(&sbi->wq_mutex);
Show full sources