Showing error 1174

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/namespace.c
Line in file: 647
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

 617                if (cpu_writer->mnt != mnt)
 618                        continue;
 619                spin_lock(&cpu_writer->lock);
 620                atomic_add(cpu_writer->count, &mnt->__mnt_writers);
 621                cpu_writer->count = 0;
 622                /*
 623                 * Might as well do this so that no one
 624                 * ever sees the pointer and expects
 625                 * it to be valid.
 626                 */
 627                cpu_writer->mnt = NULL;
 628                spin_unlock(&cpu_writer->lock);
 629        }
 630        /*
 631         * This probably indicates that somebody messed
 632         * up a mnt_want/drop_write() pair.  If this
 633         * happens, the filesystem was probably unable
 634         * to make r/w->r/o transitions.
 635         */
 636        WARN_ON(atomic_read(&mnt->__mnt_writers));
 637        dput(mnt->mnt_root);
 638        free_vfsmnt(mnt);
 639        deactivate_super(sb);
 640}
 641
 642void mntput_no_expire(struct vfsmount *mnt)
 643{
 644repeat:
 645        if (atomic_dec_and_lock(&mnt->mnt_count, &vfsmount_lock)) {
 646                if (likely(!mnt->mnt_pinned)) {
 647                        spin_unlock(&vfsmount_lock);
 648                        __mntput(mnt);
 649                        return;
 650                }
 651                atomic_add(mnt->mnt_pinned + 1, &mnt->mnt_count);
 652                mnt->mnt_pinned = 0;
 653                spin_unlock(&vfsmount_lock);
 654                acct_auto_close_mnt(mnt);
 655                security_sb_umount_close(mnt);
 656                goto repeat;
 657        }
Show full sources