patch-2.2.0-pre2 linux/arch/sparc/kernel/ptrace.c
Next file: linux/drivers/block/Config.in
Previous file: linux/arch/ppc/vmlinux.lds
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Tue Dec 29 16:35:08 1998
- Orig file:
v2.2.0-pre1/linux/arch/sparc/kernel/ptrace.c
- Orig date:
Thu May 7 22:51:47 1998
diff -u --recursive --new-file v2.2.0-pre1/linux/arch/sparc/kernel/ptrace.c linux/arch/sparc/kernel/ptrace.c
@@ -592,7 +592,9 @@
pt_error_return(regs, EINVAL);
goto out;
}
+ down(&child->mm->mmap_sem);
res = read_long(child, addr, &tmp);
+ up(&child->mm->mmap_sem);
if (res < 0) {
pt_error_return(regs, -res);
goto out;
@@ -619,8 +621,10 @@
pt_error_return(regs, EINVAL);
goto out;
}
+ down(&child->mm->mmap_sem);
vma = find_extend_vma(child, addr);
res = write_long(child, addr, data);
+ up(&child->mm->mmap_sem);
if(res < 0)
pt_error_return(regs, -res);
else
@@ -761,7 +765,9 @@
goto out;
}
while(len) {
+ down(&child->mm->mmap_sem);
res = read_byte(child, src, &tmp);
+ up(&child->mm->mmap_sem);
if(res < 0) {
pt_error_return(regs, -res);
goto out;
@@ -788,7 +794,9 @@
unsigned long tmp;
__get_user(tmp, src);
+ down(&child->mm->mmap_sem);
res = write_byte(child, dest, tmp);
+ up(&child->mm->mmap_sem);
if(res < 0) {
pt_error_return(regs, -res);
goto out;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov