Re: 2.6.15-rc1-mm2 breaks strace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-11-18 at 22:40 +0100, Bernhard Rosenkraenzer wrote:
> 2.6.15-rc1-mm2 works nicely here, aside from the artsd stuff someone else 
> already reported, and an new issue with strace (last known working: 
> 2.6.14-mm2)
> 
> [bero@localhost bero]$ strace ls
> execve("/bin/ls", ["ls"], [/* 33 vars */]) = 0
> Segmentation fault
> [ls output without any traces beyond execve-ing ls displayed here]
> 
> Also interesting:
> [bero@localhost bero]$ strace strace ls
> execve("/usr/bin/strace", ["strace", "ls"], [/* 20 vars */]) = 0
> Segmentation fault
> execve("/bin/ls", ["ls"], [/* 20 vars */]) = 0
> [ls output without any traces displayed here]


Try Christoph's patch.

Thanks,
Badari


Looks like 2.6.15-rc1-mm1 has total crap in ptrace_get_task_struct
(and it looks like my fault because I sent out a wrong patch).

The patch below should fix it:

Index: linux-2.6/kernel/ptrace.c
===================================================================
--- linux-2.6.orig/kernel/ptrace.c	2005-11-18 10:25:35.000000000 +0100
+++ linux-2.6/kernel/ptrace.c	2005-11-18 10:25:54.000000000 +0100
@@ -459,7 +459,7 @@
 	read_unlock(&tasklist_lock);
 	if (!child)
 		return ERR_PTR(-ESRCH);
-	return 0;
+	return child;
 }
 
 #ifndef __ARCH_SYS_PTRACE


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux