Source-Changes-HG archive

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

[src/trunk]: src/lib/librumpuser Fix locking SNAFU.



details:   https://anonhg.NetBSD.org/src/rev/9ccc3c5a20ea
branches:  trunk
changeset: 327166:9ccc3c5a20ea
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Feb 28 13:55:36 2014 +0000

description:
Fix locking SNAFU.

Is someone can explain why the code worked for 3+ years with multiple
different pthread implementations, I'll buy you a banana.

diffstat:

 lib/librumpuser/rumpuser_sp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 61a09eba3772 -r 9ccc3c5a20ea lib/librumpuser/rumpuser_sp.c
--- a/lib/librumpuser/rumpuser_sp.c     Fri Feb 28 11:54:47 2014 +0000
+++ b/lib/librumpuser/rumpuser_sp.c     Fri Feb 28 13:55:36 2014 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rumpuser_sp.c,v 1.62 2014/01/08 01:45:29 pooka Exp $  */
+/*      $NetBSD: rumpuser_sp.c,v 1.63 2014/02/28 13:55:36 pooka Exp $  */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -37,7 +37,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.62 2014/01/08 01:45:29 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.63 2014/02/28 13:55:36 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -1021,7 +1021,7 @@
                                        break;
                                }
                        }
-                       pthread_mutex_lock(&pfmtx);
+                       pthread_mutex_unlock(&pfmtx);
                        spcfreebuf(spc);
 
                        if (!pf) {



Home | Main Index | Thread Index | Old Index