Module Name: src
Committed By: riz
Date: Mon Feb 11 04:19:44 UTC 2013
Modified Files:
src/sys/dev/spi [netbsd-6]: spi.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #809):
sys/dev/spi/spi.c: revision 1.7
Don't leak condvars and mutexes, even if they are on the stack.
Fixes LOCKDEBUG asserts when a mutex/condvar is initialized at the same
stack address as a previous initialization. We probably want to revisit
the transfer structure lifecyle at some point in the future.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.8.1 src/sys/dev/spi/spi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/spi/spi.c
diff -u src/sys/dev/spi/spi.c:1.6 src/sys/dev/spi/spi.c:1.6.8.1
--- src/sys/dev/spi/spi.c:1.6 Fri Jul 8 03:29:15 2011
+++ src/sys/dev/spi/spi.c Mon Feb 11 04:19:44 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: spi.c,v 1.6 2011/07/08 03:29:15 mrg Exp $ */
+/* $NetBSD: spi.c,v 1.6.8.1 2013/02/11 04:19:44 riz Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.6 2011/07/08 03:29:15 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.6.8.1 2013/02/11 04:19:44 riz Exp $");
#include "locators.h"
@@ -276,6 +276,8 @@ spi_wait(struct spi_transfer *st)
cv_wait(&st->st_cv, &st->st_lock);
}
mutex_exit(&st->st_lock);
+ cv_destroy(&st->st_cv);
+ mutex_destroy(&st->st_lock);
}
void