Source-Changes-HG archive

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

[src/trunk]: src/lib/librumpuser Release sender lock before zeroing out "want...



details:   https://anonhg.NetBSD.org/src/rev/59d9d4f7f0fa
branches:  trunk
changeset: 760484:59d9d4f7f0fa
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jan 05 22:57:01 2011 +0000

description:
Release sender lock before zeroing out "wanted" status during
violent disconnect.  Fixes some race conditions (maybe the one
occasionally showing up on tests/rump/rumpkern/t_stress).

thanks to schmonz for some discussion

diffstat:

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

diffs (26 lines):

diff -r fc84de14288c -r 59d9d4f7f0fa lib/librumpuser/rumpuser_sp.c
--- a/lib/librumpuser/rumpuser_sp.c     Wed Jan 05 22:35:08 2011 +0000
+++ b/lib/librumpuser/rumpuser_sp.c     Wed Jan 05 22:57:01 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rumpuser_sp.c,v 1.29 2011/01/05 17:14:50 pooka Exp $  */
+/*      $NetBSD: rumpuser_sp.c,v 1.30 2011/01/05 22:57:01 pooka Exp $  */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: rumpuser_sp.c,v 1.29 2011/01/05 17:14:50 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_sp.c,v 1.30 2011/01/05 22:57:01 pooka Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -425,6 +425,7 @@
        pthread_mutex_lock(&spc->spc_mtx);
        spc->spc_state = SPCSTATE_DYING;
        kickall(spc);
+       sendunlockl(spc);
        pthread_mutex_unlock(&spc->spc_mtx);
 
        /*



Home | Main Index | Thread Index | Old Index