svn commit: r351702 - head/sys/kern

Mark Johnston markj at freebsd.org
Mon Sep 2 15:26:37 UTC 2019


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


More information about the svn-src-head mailing list