diff options
author | kib <kib@FreeBSD.org> | 2010-03-02 17:24:33 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-03-02 17:24:33 +0000 |
commit | c8fe5d30455c3a6576ec567a170283cb2004f034 (patch) | |
tree | 5cc7516e01e62ce0014b0f4b5deeb10ba3b0dd00 /sys/fs/msdosfs | |
parent | 82b1c5f931f9d1bfa8fec970520a7266d4294815 (diff) | |
download | FreeBSD-src-c8fe5d30455c3a6576ec567a170283cb2004f034.zip FreeBSD-src-c8fe5d30455c3a6576ec567a170283cb2004f034.tar.gz |
Do not leak vnode lock when msdosfs mount is updated and specified
device is different from the device used to the original mount.
Note that update_mp does not need devvp locked, and pmp->pm_devvp cannot
be freed meantime.
Reported and tested by: pho
MFC after: 3 weeks
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 20a4dbd..77583ee 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -383,10 +383,9 @@ msdosfs_mount(struct mount *mp) pmp = VFSTOMSDOSFS(mp); #endif } else { + vput(devvp); if (devvp != pmp->pm_devvp) - error = EINVAL; /* XXX needs translation */ - else - vput(devvp); + return (EINVAL); /* XXX needs translation */ } if (error) { vrele(devvp); |