Showing error 1588

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: fs/autofs4/waitq.c
Line in file: 365
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

335                 * point directory created and so the request dentry must
336                 * be positive or the map key doesn't exist. The situation
337                 * is very similar for indirect mounts except only dentrys
338                 * in the root of the autofs file system may be negative.
339                 */
340                if (sbi->type & AUTOFS_TYPE_TRIGGER)
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
Show full sources