svn commit: r351702 - head/sys/kern
Mateusz Guzik
mjguzik at gmail.com
Mon Sep 2 15:45:46 UTC 2019
On 9/2/19, Mark Johnston <markj at 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>
More information about the svn-src-all
mailing list