[PATCH] Drop page table lock before calling migrate_page_add(). migrate_page_add cannot be called with a spinlock held (calls isolate_lru_page which calles schedule_on_each_cpu). Drop ptl lock in check_pte_range before calling migrate_page_add(). Signed-off-by: Christoph Lameter Index: linux-2.6.15-rc5-mm2/mm/mempolicy.c =================================================================== --- linux-2.6.15-rc5-mm2.orig/mm/mempolicy.c 2005-12-12 09:10:34.000000000 -0800 +++ linux-2.6.15-rc5-mm2/mm/mempolicy.c 2005-12-12 15:17:57.000000000 -0800 @@ -210,8 +210,11 @@ static int check_pte_range(struct vm_are if (flags & MPOL_MF_STATS) gather_stats(page, private); - else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) + else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) { + spin_unlock(ptl); migrate_page_add(vma, page, private, flags); + spin_lock(ptl); + } else break; } while (pte++, addr += PAGE_SIZE, addr != end);