summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-10-27 13:22:51 +0000
committerdg <dg@FreeBSD.org>1998-10-27 13:22:51 +0000
commit7850189506d53d2fbf87d074210e34e87393cebb (patch)
treeefc83d0d70a5c70e9a1f6769b9af35d155783a1f /sys
parentbd7a76a93864fc6cb49f8b4df53b36ad095f541f (diff)
downloadFreeBSD-src-7850189506d53d2fbf87d074210e34e87393cebb.zip
FreeBSD-src-7850189506d53d2fbf87d074210e34e87393cebb.tar.gz
Added needed splvm() protection around object page traversal in
vm_object_terminate().
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_object.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 0a8d78e..1bb7a40 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.132 1998/10/23 05:43:13 dg Exp $
+ * $Id: vm_object.c,v 1.133 1998/10/25 17:44:58 phk Exp $
*/
/*
@@ -404,6 +404,7 @@ vm_object_terminate(object)
register vm_object_t object;
{
register vm_page_t p;
+ int s;
/*
* Make sure no one uses us.
@@ -449,6 +450,7 @@ vm_object_terminate(object)
* removes them from paging queues. Don't free wired pages, just
* remove them from the object.
*/
+ s = splvm();
while ((p = TAILQ_FIRST(&object->memq)) != NULL) {
#if !defined(MAX_PERF)
if (p->busy || (p->flags & PG_BUSY))
@@ -465,6 +467,7 @@ vm_object_terminate(object)
vm_page_remove(p);
}
}
+ splx(s);
/*
* Let the pager know object is dead.
OpenPOWER on IntegriCloud