From e7863f186a10bfb27af9c12c77f4f76b03279a2e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 23 Dec 2002 21:47:46 +0000 Subject: [PATCH] - Hold the page queues lock around vm_page_wakeup(). --- sys/dev/agp/agp.c | 4 ++++ sys/pci/agp.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 0a073ea6d26..22813343aef 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -443,7 +443,9 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, * Bail out. Reverse all the mappings * and unwire the pages. */ + vm_page_lock_queues(); vm_page_wakeup(m); + vm_page_unlock_queues(); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); for (k = 0; k <= i; k += PAGE_SIZE) { @@ -457,7 +459,9 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, return error; } } + vm_page_lock_queues(); vm_page_wakeup(m); + vm_page_unlock_queues(); } /* diff --git a/sys/pci/agp.c b/sys/pci/agp.c index 0a073ea6d26..22813343aef 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -443,7 +443,9 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, * Bail out. Reverse all the mappings * and unwire the pages. */ + vm_page_lock_queues(); vm_page_wakeup(m); + vm_page_unlock_queues(); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); for (k = 0; k <= i; k += PAGE_SIZE) { @@ -457,7 +459,9 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, return error; } } + vm_page_lock_queues(); vm_page_wakeup(m); + vm_page_unlock_queues(); } /*