Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/tmpfs Make sure that nde->td_node is NULL for asserts.



details:   https://anonhg.NetBSD.org/src/rev/34330dafbca1
branches:  trunk
changeset: 811422:34330dafbca1
user:      leot <leot%NetBSD.org@localhost>
date:      Thu Oct 29 16:19:44 2015 +0000

description:
Make sure that nde->td_node is NULL for asserts.
Thanks and from Mindaugas Rasiukevicius.

Fixes PR kern/50381.

diffstat:

 sys/fs/tmpfs/tmpfs_subr.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r da5eda15367f -r 34330dafbca1 sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c Thu Oct 29 15:19:43 2015 +0000
+++ b/sys/fs/tmpfs/tmpfs_subr.c Thu Oct 29 16:19:44 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_subr.c,v 1.100 2015/07/07 09:30:24 justin Exp $  */
+/*     $NetBSD: tmpfs_subr.c,v 1.101 2015/10/29 16:19:44 leot Exp $    */
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.100 2015/07/07 09:30:24 justin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.101 2015/10/29 16:19:44 leot Exp $");
 
 #include <sys/param.h>
 #include <sys/cprng.h>
@@ -459,6 +459,7 @@
        nde->td_namelen = len;
        memcpy(nde->td_name, name, len);
        nde->td_seq = TMPFS_DIRSEQ_NONE;
+       nde->td_node = NULL; /* for asserts */
 
        *de = nde;
        return 0;



Home | Main Index | Thread Index | Old Index