Source-Changes-HG archive

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

[src/trunk]: src/sys/kern If mutex_tryenter() fails, don't call mutex_exit().



details:   https://anonhg.NetBSD.org/src/rev/987c11a8b53f
branches:  trunk
changeset: 331588:987c11a8b53f
user:      apb <apb%NetBSD.org@localhost>
date:      Fri Aug 15 11:05:35 2014 +0000

description:
If mutex_tryenter() fails, don't call mutex_exit().

diffstat:

 sys/kern/subr_prf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 79551693d363 -r 987c11a8b53f sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c       Fri Aug 15 11:05:07 2014 +0000
+++ b/sys/kern/subr_prf.c       Fri Aug 15 11:05:35 2014 +0000
@@ -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 @@
                        /* This is optional but seems useful. */
                        SHA512_Update(&kprnd_sha, kprnd_accum,
                                      sizeof(kprnd_accum));
+                       mutex_exit(&kprintf_mtx);
                }
-               mutex_exit(&kprintf_mtx);
        }
 }
 



Home | Main Index | Thread Index | Old Index