patch-2.1.106 linux/mm/mremap.c

Next file: linux/mm/swapfile.c
Previous file: linux/mm/mprotect.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.105/linux/mm/mremap.c linux/mm/mremap.c
@@ -167,6 +167,7 @@
 	struct vm_area_struct *vma;
 	unsigned long ret = -EINVAL;
 
+	down(&current->mm->mmap_sem);
 	lock_kernel();
 	if (addr & ~PAGE_MASK)
 		goto out;
@@ -233,5 +234,6 @@
 		ret = -ENOMEM;
 out:
 	unlock_kernel();
+	up(&current->mm->mmap_sem);
 	return ret;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov