Date: Tue, 2 Mar 2010 17:24:33 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r204589 - head/sys/fs/msdosfs Message-ID: <201003021724.o22HOX4O093238@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003021724.o22HOX4O093238>
