svn commit: r204589 - head/sys/fs/msdosfs
Konstantin Belousov
kib at FreeBSD.org
Tue Mar 2 17:24:33 UTC 2010
Author: kib
Date: Tue Mar 2 17:24:33 2010
New Revision: 204589
URL: http://svn.freebsd.org/changeset/base/204589
Log:
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
Modified:
head/sys/fs/msdosfs/msdosfs_vfsops.c
Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c Tue Mar 2 17:20:04 2010 (r204588)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c Tue Mar 2 17:24:33 2010 (r204589)
@@ -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);
More information about the svn-src-all
mailing list