* [PATCH] m68k ptrace
@ 2003-05-11 10:30 Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2003-05-11 10:30 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Kernel Development, Geert Uytterhoeven
M68k: Use ptrace_check_attach instead of doing the checks ourselves (from
Andreas Schwab).
--- linux-2.5.x/arch/m68k/kernel/ptrace.c 4 Nov 2002 23:39:45 -0000 1.1.1.4
+++ linux-m68k-2.5.x/arch/m68k/kernel/ptrace.c 22 Mar 2003 18:39:06 -0000
@@ -135,14 +135,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->parent != current)
+
+ ret = ptrace_check_attach(child, request == PTRACE_KILL);
+ if (ret < 0)
goto out_tsk;
switch (request) {
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] M68k ptrace
@ 2003-08-29 14:49 Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2003-08-29 14:49 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Linux Kernel Development, Geert Uytterhoeven
M68k: Use ptrace_check_attach instead of doing the checks ourselves (from
Andreas Schwab).
--- linux-2.4.23-pre1/arch/m68k/kernel/ptrace.c 12 Nov 2001 20:04:34 -0000 1.2
+++ linux-m68k-2.4.23-pre1/arch/m68k/kernel/ptrace.c 22 Mar 2003 18:38:07 -0000
@@ -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) {
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-29 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-11 10:30 [PATCH] m68k ptrace Geert Uytterhoeven
2003-08-29 14:49 [PATCH] M68k ptrace Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).