From 54e81b8fb2e7187898182ccd90612c0e78b3c3f3 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 2 Jun 2011 19:12:03 +0000 Subject: In vndclear(), clear all the flag bits. Leaving around a VNF_WLABEL bit is stupid (verified to be the case). Other flag bits might have lived longer than they should as well, with unknown consequences. Spotted with matthew, too. --- sys/dev/vnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 54cb6d94066..cd8c9bc18e2 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.119 2011/06/02 19:10:19 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.120 2011/06/02 19:12:02 deraadt Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -789,7 +789,7 @@ vndclear(struct vnd_softc *vnd) DNPRINTF(VDB_FOLLOW, "vndclear(%p): vp %p\n", vnd, vp); - vnd->sc_flags &= ~VNF_INITED; + vnd->sc_flags = 0; if (vp == NULL) panic("vndioctl: null vp"); (void) vn_close(vp, VNDRW(vnd), vnd->sc_cred, p); -- cgit v1.2.3