Module Name: src
Committed By: pooka
Date: Wed Sep 8 20:40:25 UTC 2010
Modified Files:
src/tests/rump/kernspace: busypage.c
Log Message:
vm object must be locked during page allocation.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/rump/kernspace/busypage.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/rump/kernspace/busypage.c
diff -u src/tests/rump/kernspace/busypage.c:1.1 src/tests/rump/kernspace/busypage.c:1.2
--- src/tests/rump/kernspace/busypage.c:1.1 Mon May 31 23:32:51 2010
+++ src/tests/rump/kernspace/busypage.c Wed Sep 8 20:40:24 2010
@@ -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");