patch-2.4.23 linux-2.4.23/arch/m68k/kernel/ptrace.c
Next file: linux-2.4.23/arch/m68k/math-emu/fp_emu.h
Previous file: linux-2.4.23/arch/m68k/defconfig
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
2003-11-28 10:26:19.000000000 -0800
- Orig file:
linux-2.4.22/arch/m68k/kernel/ptrace.c
- Orig date:
2002-08-02 17:39:43.000000000 -0700
diff -urN linux-2.4.22/arch/m68k/kernel/ptrace.c linux-2.4.23/arch/m68k/kernel/ptrace.c
@@ -133,14 +133,9 @@
ret = ptrace_attach(child);
goto out_tsk;
}
- ret = -ESRCH;
- if (!(child->ptrace & PT_PTRACED))
- goto out_tsk;
- if (child->state != TASK_STOPPED) {
- if (request != PTRACE_KILL)
- goto out_tsk;
- }
- if (child->p_pptr != current)
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
goto out_tsk;
switch (request) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)