patch-2.4.3 linux/arch/ia64/ia32/sys_ia32.c
Next file: linux/arch/ia64/kernel/sys_ia64.c
Previous file: linux/arch/ia64/ia32/binfmt_elf32.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Mon Mar 19 12:35:10 2001
- Orig file:
v2.4.2/linux/arch/ia64/ia32/sys_ia32.c
- Orig date:
Wed Feb 21 18:20:11 2001
diff -u --recursive --new-file v2.4.2/linux/arch/ia64/ia32/sys_ia32.c linux/arch/ia64/ia32/sys_ia32.c
@@ -120,12 +120,12 @@
* `execve' frees all current memory we only have to do an
* `munmap' if the `execve' failes.
*/
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
av = (char **) do_mmap_pgoff(0, 0UL, len, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (IS_ERR(av))
return (long)av;
@@ -247,9 +247,9 @@
back = kmalloc(PAGE_SIZE - ((addr + len) & ~PAGE_MASK), GFP_KERNEL);
__copy_user(back, (char *)addr + len, PAGE_SIZE - ((addr + len) & ~PAGE_MASK));
}
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
r = do_mmap(0, baddr, len + (addr - baddr), prot, flags | MAP_ANONYMOUS, 0);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (r < 0)
return(r);
if (addr == 0)
@@ -293,9 +293,9 @@
poff = offset & PAGE_MASK;
len += offset - poff;
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
error = do_mmap_pgoff(file, addr, len, prot, flags, poff >> PAGE_SHIFT);
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (!IS_ERR((void *) error))
error += offset - poff;
@@ -2573,7 +2573,7 @@
return(-EFAULT);
}
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
lock_kernel();
addr = do_mmap_pgoff(file, IA32_IOBASE,
@@ -2581,7 +2581,7 @@
(ia64_iobase & ~PAGE_OFFSET) >> PAGE_SHIFT);
unlock_kernel();
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
if (addr >= 0) {
__asm__ __volatile__("mov ar.k0=%0 ;;" :: "r"(addr));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)