1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

vfs: restore mp null check in vop_stdgetwritemount

The initially read mount point can already be NULL.

Reported by:	markj
Fixes: r351656 ("vfs: stop refing freed mount points in vop_stdgetwritemount")
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mateusz Guzik 2019-09-02 15:24:25 +00:00
parent 458ba18d43
commit 1874c61b90
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351702

View File

@ -601,6 +601,8 @@ vop_stdgetwritemount(ap)
*/
vp = ap->a_vp;
mp = vp->v_mount;
if (mp == NULL)
goto out;
MNT_ILOCK(mp);
if (mp != vp->v_mount) {
MNT_IUNLOCK(mp);