patch-2.3.9 linux/arch/arm/kernel/sys_arm.c

Next file: linux/arch/arm/mm/init.c
Previous file: linux/arch/arm/kernel/entry-common.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.8/linux/arch/arm/kernel/sys_arm.c linux/arch/arm/kernel/sys_arm.c
@@ -72,6 +72,7 @@
 	struct file * file = NULL;
 	struct mmap_arg_struct a;
 
+	down(&current->mm->mmap_sem);
 	lock_kernel();
 	if (copy_from_user(&a, arg, sizeof(a)))
 		goto out;
@@ -87,6 +88,7 @@
 		fput(file);
 out:
 	unlock_kernel();
+	up(&current->mm->mmap_sem);
 	return error;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)