Date: Mon, 2 Sep 2019 11:26:33 -0400 From: Mark Johnston <markj@freebsd.org> To: Mateusz Guzik <mjg@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r351702 - head/sys/kern Message-ID: <20190902152633.GE68323@raichu> In-Reply-To: <201909021524.x82FOQZO033532@repo.freebsd.org> References: <201909021524.x82FOQZO033532@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 02, 2019 at 03:24:26PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Mon Sep 2 15:24:25 2019 > New Revision: 351702 > URL: https://svnweb.freebsd.org/changeset/base/351702 > > Log: > vfs: restore mp null check in vop_stdgetwritemount > > The initially read mount point can already be NULL. > > Reported by: markj Just a correction: it was Peter that found the bug, not me. > Fixes: r351656 ("vfs: stop refing freed mount points in vop_stdgetwritemount") > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/kern/vfs_default.c > > Modified: head/sys/kern/vfs_default.c > ============================================================================== > --- head/sys/kern/vfs_default.c Mon Sep 2 14:51:59 2019 (r351701) > +++ head/sys/kern/vfs_default.c Mon Sep 2 15:24:25 2019 (r351702) > @@ -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); >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190902152633.GE68323>