Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/specfs Revert previous, and explain why.



details:   https://anonhg.NetBSD.org/src/rev/675260ac45d3
branches:  trunk
changeset: 809287:675260ac45d3
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 29 16:25:49 2015 +0000

description:
Revert previous, and explain why.

diffstat:

 sys/miscfs/specfs/spec_vnops.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 54057211601c -r 675260ac45d3 sys/miscfs/specfs/spec_vnops.c
--- a/sys/miscfs/specfs/spec_vnops.c    Mon Jun 29 16:20:14 2015 +0000
+++ b/sys/miscfs/specfs/spec_vnops.c    Mon Jun 29 16:25:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spec_vnops.c,v 1.149 2015/06/29 15:39:40 christos Exp $        */
+/*     $NetBSD: spec_vnops.c,v 1.150 2015/06/29 16:25:49 christos Exp $        */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.149 2015/06/29 15:39:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.150 2015/06/29 16:25:49 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -1097,7 +1097,12 @@
        struct vnode *vp = ap->a_vp;
 
        KASSERT(vp->v_mount == dead_rootmount);
-       vcache_remove(vp->v_mount, vp, sizeof(*vp));
+       /*
+        * The key is the pointer itself, see:
+        * miscfs/deadfs/dead_vfsops::dead_newvnode()
+        * coverity[sizeof_mismatch]
+        */
+       vcache_remove(vp->v_mount, vp, sizeof(struct vnode *));
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index