diff options
author | mckusick <mckusick@FreeBSD.org> | 2015-12-03 02:04:22 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2015-12-03 02:04:22 +0000 |
commit | 25671cd0d574bba616ecf957b39e1f1029403d42 (patch) | |
tree | 078d2e221f2b9602fdf64a0e9cdff1ab366f5153 /sys/kern/vfs_subr.c | |
parent | 4bced8674ece4f9d2ac299c702ca6b0ce445f024 (diff) | |
download | FreeBSD-src-25671cd0d574bba616ecf957b39e1f1029403d42.zip FreeBSD-src-25671cd0d574bba616ecf957b39e1f1029403d42.tar.gz |
We need to zero out the union of pointers in a freed vnode structure.
PR: 204949
Fix from: Mateusz Guzik
Tested by: Jason Unovitch
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ddab9f0..ff37de8 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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; |