Module Name: src Committed By: yamt Date: Fri Feb 11 09:15:45 UTC 2011
Modified Files: src/sys/fs/puffs: puffs_msgif.c Log Message: puffs_msg_wait: check PARKFLAG_HASERROR before PARKFLAG_CALL. PR/44240. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/fs/puffs/puffs_msgif.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/fs/puffs/puffs_msgif.c diff -u src/sys/fs/puffs/puffs_msgif.c:1.84 src/sys/fs/puffs/puffs_msgif.c:1.85 --- src/sys/fs/puffs/puffs_msgif.c:1.84 Mon Nov 15 20:31:41 2010 +++ src/sys/fs/puffs/puffs_msgif.c Fri Feb 11 09:15:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.84 2010/11/15 20:31:41 pooka Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.85 2011/02/11 09:15:45 yamt Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.84 2010/11/15 20:31:41 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.85 2011/02/11 09:15:45 yamt Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -468,13 +468,6 @@ mutex_exit(&pmp->pmp_lock); mutex_enter(&park->park_mtx); - if ((park->park_flags & PARKFLAG_WANTREPLY) == 0 - || (park->park_flags & PARKFLAG_CALL)) { - mutex_exit(&park->park_mtx); - rv = 0; - goto skipwait; - } - /* did the response beat us to the wait? */ if (__predict_false((park->park_flags & PARKFLAG_DONE) || (park->park_flags & PARKFLAG_HASERROR))) { @@ -483,6 +476,13 @@ goto skipwait; } + if ((park->park_flags & PARKFLAG_WANTREPLY) == 0 + || (park->park_flags & PARKFLAG_CALL)) { + mutex_exit(&park->park_mtx); + rv = 0; + goto skipwait; + } + error = cv_wait_sig(&park->park_cv, &park->park_mtx); DPRINTF(("puffs_touser: waiter for %p woke up with %d\n", park, error));