--- linux-2.4.3-pre6/mm/vmalloc.c Fri Mar 23 02:16:41 2001 +++ linux/mm/vmalloc.c Fri Mar 23 02:09:58 2001 @@ -136,39 +136,41 @@ inline int vmalloc_area_pages (unsigned long address, unsigned long size, int gfp_mask, pgprot_t prot) { pgd_t * dir; unsigned long end = address + size; int ret; dir = pgd_offset_k(address); flush_cache_all(); + spin_lock(&init_mm.page_table_lock); lock_kernel(); do { pmd_t *pmd; pmd = pmd_alloc(&init_mm, dir, address); ret = -ENOMEM; if (!pmd) break; ret = -ENOMEM; if (alloc_area_pmd(pmd, address, end - address, gfp_mask, prot)) break; address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; ret = 0; } while (address && (address < end)); unlock_kernel(); + spin_unlock(&init_mm.page_table_lock); flush_tlb_all(); return ret; } struct vm_struct * get_vm_area(unsigned long size, unsigned long flags) { unsigned long addr; struct vm_struct **p, *tmp, *area; area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);