patch-2.1.17 linux/arch/sparc/kernel/ptrace.c

Next file: linux/arch/sparc/kernel/setup.c
Previous file: linux/arch/sparc/kernel/process.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.16/linux/arch/sparc/kernel/ptrace.c linux/arch/sparc/kernel/ptrace.c
@@ -537,7 +537,7 @@
 		return;
 	}
 
-	if(request == PTRACE_SUNATTACH) {
+	if(request == PTRACE_SUNATTACH || request == PTRACE_ATTACH) {
 		if(child == current) {
 			/* Try this under SunOS/Solaris, bwa haha
 			 * You'll never be able to kill the process. ;-)
@@ -568,7 +568,8 @@
 		pt_succ_return(regs, 0);
 		return;
 	}
-	if(!(child->flags & PF_PTRACED)) {
+	if(!(child->flags & PF_PTRACED) && (request!=PTRACE_SUNATTACH) &&
+	   (request!=PTRACE_ATTACH)) {
 		pt_error_return(regs, ESRCH);
 		return;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov