Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/drm Make sure rbtrees are empty on des...
details: https://anonhg.NetBSD.org/src/rev/3dac6cd29c94
branches: trunk
changeset: 344770:3dac6cd29c94
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Apr 19 02:52:29 2016 +0000
description:
Make sure rbtrees are empty on desctruction.
If related to PR kern/51076, might help catch the bug a bit earlier.
diffstat:
sys/external/bsd/drm2/drm/drm_vma_manager.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r da134d7d6b3c -r 3dac6cd29c94 sys/external/bsd/drm2/drm/drm_vma_manager.c
--- a/sys/external/bsd/drm2/drm/drm_vma_manager.c Mon Apr 18 19:37:41 2016 +0000
+++ b/sys/external/bsd/drm2/drm/drm_vma_manager.c Tue Apr 19 02:52:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_vma_manager.c,v 1.3 2015/06/19 22:51:57 chs Exp $ */
+/* $NetBSD: drm_vma_manager.c,v 1.4 2016/04/19 02:52:29 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_vma_manager.c,v 1.3 2015/06/19 22:51:57 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vma_manager.c,v 1.4 2016/04/19 02:52:29 riastradh Exp $");
#include <sys/kmem.h>
#include <sys/rbtree.h>
@@ -120,6 +120,8 @@
{
vmem_destroy(mgr->vom_vmem);
+ KASSERTMSG((RB_TREE_MIN(&mgr->vom_nodes) == NULL),
+ "drm vma offset manager %p not empty", mgr);
#if 0
rb_tree_destroy(&mgr->vom_nodes);
#endif
@@ -143,6 +145,8 @@
drm_vma_node_destroy(struct drm_vma_offset_node *node)
{
+ KASSERTMSG((RB_TREE_MIN(&node->von_files) == NULL),
+ "drm vma node %p not empty", node);
#if 0
rb_tree_destroy(&node->von_files);
#endif
Home |
Main Index |
Thread Index |
Old Index