Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2015 02:04:22 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r291671 - head/sys/kern
Message-ID:  <201512030204.tB324McQ009299@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Thu Dec  3 02:04:22 2015
New Revision: 291671
URL: https://svnweb.freebsd.org/changeset/base/291671

Log:
  We need to zero out the union of pointers in a freed vnode structure.
  
  PR:        204949
  Fix from:  Mateusz Guzik
  Tested by: Jason Unovitch

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Thu Dec  3 02:00:36 2015	(r291670)
+++ head/sys/kern/vfs_subr.c	Thu Dec  3 02:04:22 2015	(r291671)
@@ -2782,6 +2782,7 @@ _vdrop(struct vnode *vp, bool locked)
 	/* XXX Elsewhere we detect an already freed vnode via NULL v_op. */
 	vp->v_op = NULL;
 #endif
+	bzero(&vp->v_un, sizeof(vp->v_un));
 	vp->v_iflag = 0;
 	vp->v_vflag = 0;
 	bo->bo_flag = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512030204.tB324McQ009299>