patch-2.2.0-pre5 linux/arch/m68k/kernel/ptrace.c
Next file: linux/arch/m68k/mac/config.c
Previous file: linux/arch/m68k/kernel/process.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Tue Jan 5 11:20:43 1999
- Orig file:
v2.2.0-pre4/linux/arch/m68k/kernel/ptrace.c
- Orig date:
Thu Nov 12 16:21:18 1998
diff -u --recursive --new-file v2.2.0-pre4/linux/arch/m68k/kernel/ptrace.c linux/arch/m68k/kernel/ptrace.c
@@ -375,7 +375,9 @@
case PTRACE_PEEKDATA: {
unsigned long tmp;
+ down(&child->mm->mmap_sem);
ret = read_long(child, addr, &tmp);
+ up(&child->mm->mmap_sem);
if (ret >= 0)
ret = put_user(tmp, (unsigned long *) data);
goto out;
@@ -408,7 +410,9 @@
/* when I and D space are separate, this will have to be fixed. */
case PTRACE_POKETEXT: /* write the word at location addr. */
case PTRACE_POKEDATA:
+ down(&child->mm->mmap_sem);
ret = write_long(child,addr,data);
+ up(&child->mm->mmap_sem);
goto out;
case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov