patch-2.2.0-pre2 linux/arch/i386/kernel/ptrace.c
Next file: linux/arch/i386/kernel/setup.c
Previous file: linux/arch/i386/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Tue Dec 29 15:59:32 1998
- Orig file:
v2.2.0-pre1/linux/arch/i386/kernel/ptrace.c
- Orig date:
Fri Nov 27 13:09:22 1998
diff -u --recursive --new-file v2.2.0-pre1/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
@@ -420,7 +420,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;
@@ -451,7 +453,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