Skip to contentSkip to conversation

v850 ptrace.c bug ...

PATCH Herbert Poetzl 1 participant 1 message Feb 19, 2004 ptrace support

lore
Share & tools
lore
#0 lore raw

Hi!

stumbled over the following bug:

sys_ptrace() for v850, if pid == 1, doesn't put the struct task_struct (child), the following patch should fix that ...

best,
Herbert

arch/v850/kernel/ptrace.c renamed from arch/v850/kernel/ptrace.c.orig +1 -1
@@ -138,7 +138,7 @@ int sys_ptrace(long request, long pid, l
 
 	rval = -EPERM;
 	if (pid == 1)		/* you may not mess with init */
-		goto out;
+		goto out_tsk;
 
 	if (request == PTRACE_ATTACH) {
 		rval = ptrace_attach(child);