Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/tprof tprof_start: don't forget to restore refcount ...
details: https://anonhg.NetBSD.org/src/rev/16870425969c
branches: trunk
changeset: 762699:16870425969c
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Feb 25 22:35:38 2011 +0000
description:
tprof_start: don't forget to restore refcount when failed to start backend.
diffstat:
sys/dev/tprof/tprof.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r cd75d85cf25b -r 16870425969c sys/dev/tprof/tprof.c
--- a/sys/dev/tprof/tprof.c Fri Feb 25 21:40:48 2011 +0000
+++ b/sys/dev/tprof/tprof.c Fri Feb 25 22:35:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof.c,v 1.8 2011/02/05 14:04:40 yamt Exp $ */
+/* $NetBSD: tprof.c,v 1.9 2011/02/25 22:35:38 yamt Exp $ */
/*-
* Copyright (c)2008,2009,2010 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.8 2011/02/05 14:04:40 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.9 2011/02/25 22:35:38 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -295,6 +295,8 @@
error = tb->tb_ops->tbo_start(NULL);
if (error != 0) {
+ KASSERT(tb->tb_usecount > 0);
+ tb->tb_usecount--;
tprof_stop1();
goto done;
}
Home |
Main Index |
Thread Index |
Old Index