Module Name:    src
Committed By:   pooka
Date:           Thu Sep  9 10:02:14 UTC 2010

Modified Files:
        src/sys/rump/librump/rumpkern: vm.c

Log Message:
Assert that object is locked in page unbusy.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/rump/librump/rumpkern/vm.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/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.93 src/sys/rump/librump/rumpkern/vm.c:1.94
--- src/sys/rump/librump/rumpkern/vm.c:1.93	Wed Sep  8 21:14:32 2010
+++ src/sys/rump/librump/rumpkern/vm.c	Thu Sep  9 10:02:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.93 2010/09/08 21:14:32 pooka Exp $	*/
+/*	$NetBSD: vm.c,v 1.94 2010/09/09 10:02:14 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.93 2010/09/08 21:14:32 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.94 2010/09/09 10:02:14 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -484,6 +484,9 @@
 	struct vm_page *pg;
 	int i;
 
+	KASSERT(npgs > 0);
+	KASSERT(mutex_owned(&pgs[0]->uobject->vmobjlock));
+
 	for (i = 0; i < npgs; i++) {
 		pg = pgs[i];
 		if (pg == NULL)

Reply via email to