diff options
author | dfr <dfr@FreeBSD.org> | 1998-08-06 08:33:19 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-08-06 08:33:19 +0000 |
commit | 0864bef6791e1818c64fa41c0eb3e69ffe0066d9 (patch) | |
tree | 7d9411f07b566d86fd0730872a748080ff8a6d8b /sys/vm/vm_object.c | |
parent | 203de4af5d0b4c199f18b2451ea9b044b2c8a6b2 (diff) | |
download | FreeBSD-src-0864bef6791e1818c64fa41c0eb3e69ffe0066d9.zip FreeBSD-src-0864bef6791e1818c64fa41c0eb3e69ffe0066d9.tar.gz |
Protect all modifications to paging_in_progress with splvm(). The i386
managed to avoid corruption of this variable by luck (the compiler used a
memory read-modify-write instruction which wasn't interruptable) but other
architectures cannot.
With this change, I am now able to 'make buildworld' on the alpha (sfx: the
crowd goes wild...)
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r-- | sys/vm/vm_object.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 3d9ae5a..1af903f 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.124 1998/07/11 11:30:45 bde Exp $ + * $Id: vm_object.c,v 1.125 1998/07/14 12:26:15 bde Exp $ */ /* @@ -1102,9 +1102,9 @@ vm_object_collapse(object) */ if (backing_object->type == OBJT_SWAP) { - backing_object->paging_in_progress++; + vm_object_pip_add(backing_object, 1); if (object->type == OBJT_SWAP) { - object->paging_in_progress++; + vm_object_pip_add(object, 1); /* * copy shadow object pages into ours * and destroy unneeded pages in @@ -1118,7 +1118,7 @@ vm_object_collapse(object) OFF_TO_IDX(object->backing_object_offset), TRUE); vm_object_pip_wakeup(object); } else { - object->paging_in_progress++; + vm_object_pip_add(object, 1); /* * move the shadow backing_object's pager data to * "object" and convert "object" type to OBJT_SWAP. @@ -1314,7 +1314,7 @@ vm_object_page_remove(object, start, end, clean_only) all = ((end == 0) && (start == 0)); - object->paging_in_progress++; + vm_object_pip_add(object, 1); again: size = end - start; if (all || size > 4 || size >= object->size / 4) { |