Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/rump/kernspace vm object must be locked during page al...
details: https://anonhg.NetBSD.org/src/rev/c669a8301107
branches: trunk
changeset: 757628:c669a8301107
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Sep 08 20:40:24 2010 +0000
description:
vm object must be locked during page allocation.
diffstat:
tests/rump/kernspace/busypage.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 3400d6d19ed6 -r c669a8301107 tests/rump/kernspace/busypage.c
--- a/tests/rump/kernspace/busypage.c Wed Sep 08 19:21:13 2010 +0000
+++ b/tests/rump/kernspace/busypage.c Wed Sep 08 20:40:24 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: busypage.c,v 1.1 2010/05/31 23:32:51 pooka Exp $ */
+/* $NetBSD: busypage.c,v 1.2 2010/09/08 20:40:24 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: busypage.c,v 1.1 2010/05/31 23:32:51 pooka Exp $");
+__RCSID("$NetBSD: busypage.c,v 1.2 2010/09/08 20:40:24 pooka Exp $");
#endif /* !lint */
#include <sys/param.h>
@@ -69,7 +69,9 @@
cv_init(&tcv, "napina");
uobj = uao_create(1, 0);
+ mutex_enter(&uobj->vmobjlock);
testpg = uvm_pagealloc(uobj, 0, NULL, 0);
+ mutex_exit(&uobj->vmobjlock);
if (testpg == NULL)
panic("couldn't create vm page");
Home |
Main Index |
Thread Index |
Old Index