diff options
author | alc <alc@FreeBSD.org> | 2002-12-17 19:55:28 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-12-17 19:55:28 +0000 |
commit | 09d11f3af345b158ad9efba3cb9c3460c6c6e34b (patch) | |
tree | 2a9d07096f0a0df50e3ac52aeff810757ce9efc4 /sys | |
parent | cebd669474b47a0afa24434b16ec4a21025fec60 (diff) | |
download | FreeBSD-src-09d11f3af345b158ad9efba3cb9c3460c6c6e34b.zip FreeBSD-src-09d11f3af345b158ad9efba3cb9c3460c6c6e34b.tar.gz |
Hold the page queues lock when performing vm_page_flag_set().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/phys_pager.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_kern.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index c271959..82ce6f2 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -145,9 +145,9 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) for (i = 0; i < count; i++) { if ((m[i]->flags & PG_ZERO) == 0) pmap_zero_page(m[i]); - vm_page_flag_set(m[i], PG_ZERO); /* Switch off pv_entries */ vm_page_lock_queues(); + vm_page_flag_set(m[i], PG_ZERO); vm_page_unmanage(m[i]); vm_page_unlock_queues(); m[i]->valid = VM_PAGE_BITS_ALL; diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 18c7d50..2596e1d 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -433,7 +433,9 @@ retry: * Because this is kernel_pmap, this call will not block. */ pmap_enter(kernel_pmap, addr + i, m, VM_PROT_ALL, 1); + vm_page_lock_queues(); vm_page_flag_set(m, PG_WRITEABLE | PG_REFERENCED); + vm_page_unlock_queues(); } vm_map_unlock(map); |