mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 23:50:27 +00:00
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
This commit is contained in:
parent
e1c6ef6aa4
commit
6c0358cc98
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204589
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue