aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index d8ed4006b3d2..621afb6343dc 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -958,11 +958,12 @@ void vmalloc_sync_all(void)
958 for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) { 958 for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) {
959 if (!test_bit(pgd_index(address), insync)) { 959 if (!test_bit(pgd_index(address), insync)) {
960 const pgd_t *pgd_ref = pgd_offset_k(address); 960 const pgd_t *pgd_ref = pgd_offset_k(address);
961 unsigned long flags;
961 struct page *page; 962 struct page *page;
962 963
963 if (pgd_none(*pgd_ref)) 964 if (pgd_none(*pgd_ref))
964 continue; 965 continue;
965 spin_lock(&pgd_lock); 966 spin_lock_irqsave(&pgd_lock, flags);
966 list_for_each_entry(page, &pgd_list, lru) { 967 list_for_each_entry(page, &pgd_list, lru) {
967 pgd_t *pgd; 968 pgd_t *pgd;
968 pgd = (pgd_t *)page_address(page) + pgd_index(address); 969 pgd = (pgd_t *)page_address(page) + pgd_index(address);
@@ -971,7 +972,7 @@ void vmalloc_sync_all(void)
971 else 972 else
972 BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); 973 BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
973 } 974 }
974 spin_unlock(&pgd_lock); 975 spin_unlock_irqrestore(&pgd_lock, flags);
975 set_bit(pgd_index(address), insync); 976 set_bit(pgd_index(address), insync);
976 } 977 }
977 if (address == start) 978 if (address == start)