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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"