Module Name: src
Committed By: apb
Date: Fri Aug 15 11:05:35 UTC 2014
Modified Files:
src/sys/kern: subr_prf.c
Log Message:
If mutex_tryenter() fails, don't call mutex_exit().
To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/kern/subr_prf.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/kern/subr_prf.c
diff -u src/sys/kern/subr_prf.c:1.155 src/sys/kern/subr_prf.c:1.156
--- src/sys/kern/subr_prf.c:1.155 Fri Aug 15 07:39:25 2014
+++ src/sys/kern/subr_prf.c Fri Aug 15 11:05:35 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.155 2014/08/15 07:39:25 mrg Exp $ */
+/* $NetBSD: subr_prf.c,v 1.156 2014/08/15 11:05:35 apb Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.155 2014/08/15 07:39:25 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.156 2014/08/15 11:05:35 apb Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@@ -161,8 +161,8 @@ static void kprintf_rnd_get(size_t bytes
/* This is optional but seems useful. */
SHA512_Update(&kprnd_sha, kprnd_accum,
sizeof(kprnd_accum));
+ mutex_exit(&kprintf_mtx);
}
- mutex_exit(&kprintf_mtx);
}
}