Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern rw_vector_enter: reload owner in the case of no han...
details: https://anonhg.NetBSD.org/src/rev/2bae8223b618
branches: trunk
changeset: 783248:2bae8223b618
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Dec 12 14:53:01 2012 +0000
description:
rw_vector_enter: reload owner in the case of no hand-off.
this fixes crashes in rw_oncpu().
diffstat:
sys/kern/kern_rwlock.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r ee26b50f8125 -r 2bae8223b618 sys/kern/kern_rwlock.c
--- a/sys/kern/kern_rwlock.c Wed Dec 12 13:34:49 2012 +0000
+++ b/sys/kern/kern_rwlock.c Wed Dec 12 14:53:01 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rwlock.c,v 1.38 2012/02/25 22:32:44 rmind Exp $ */
+/* $NetBSD: kern_rwlock.c,v 1.39 2012/12/12 14:53:01 yamt Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.38 2012/02/25 22:32:44 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.39 2012/12/12 14:53:01 yamt Exp $");
#define __RWLOCK_PRIVATE
@@ -394,6 +394,8 @@
*/
if (op == RW_READER || (rw->rw_owner & RW_THREAD) == curthread)
break;
+
+ owner = rw->rw_owner;
}
KPREEMPT_ENABLE(curlwp);
Home |
Main Index |
Thread Index |
Old Index