Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Sep 2019 17:45:44 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Mark Johnston <markj@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:  <CAGudoHELu6sA7SaCZaJdhYGM7=urubx%2BA5OVbkcJGwUQxa9ESw@mail.gmail.com>
In-Reply-To: <20190902152633.GE68323@raichu>
References:  <201909021524.x82FOQZO033532@repo.freebsd.org> <20190902152633.GE68323@raichu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/2/19, Mark Johnston <markj@freebsd.org> wrote:
> 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.
>

Yup, apologies. Automatically credited the person who sent the e-mail.

>>   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);
>>
>


-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHELu6sA7SaCZaJdhYGM7=urubx%2BA5OVbkcJGwUQxa9ESw>