Module Name:    src
Committed By:   ad
Date:           Thu Jan  2 16:56:58 UTC 2020

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

Log Message:
rump: initialize pg->interlock


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 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.180 src/sys/rump/librump/rumpkern/vm.c:1.181
--- src/sys/rump/librump/rumpkern/vm.c:1.180	Tue Dec 31 23:32:05 2019
+++ src/sys/rump/librump/rumpkern/vm.c	Thu Jan  2 16:56:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.180 2019/12/31 23:32:05 ad Exp $	*/
+/*	$NetBSD: vm.c,v 1.181 2020/01/02 16:56:58 ad Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.180 2019/12/31 23:32:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.181 2020/01/02 16:56:58 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -167,6 +167,7 @@ uvm_pagealloc_strat(struct uvm_object *u
 	if (__predict_false(pg == NULL)) {
 		return NULL;
 	}
+	mutex_init(&pg->interlock, MUTEX_DEFAULT, IPL_NONE);
 
 	pg->offset = off;
 	pg->uobject = uobj;
@@ -226,6 +227,7 @@ uvm_pagefree(struct vm_page *pg)
 		atomic_dec_uint(&vmpage_onqueue);
 	}
 
+	mutex_destroy(&pg->interlock);
 	pool_cache_put(&pagecache, pg);
 }
 

Reply via email to