patch-2.3.99-pre6 linux/arch/sparc64/kernel/ptrace.c

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

diff -u --recursive --new-file v2.3.99-pre5/linux/arch/sparc64/kernel/ptrace.c linux/arch/sparc64/kernel/ptrace.c
@@ -68,7 +68,7 @@
 static void
 pt_os_succ_return (struct pt_regs *regs, unsigned long val, long *addr)
 {
-	if (current->personality & PER_BSD)
+	if (current->personality == PER_SUNOS)
 		pt_succ_return (regs, val);
 	else
 		pt_succ_return_linux (regs, val, addr);
@@ -164,8 +164,8 @@
 		goto out;
 	}
 
-	if (((current->personality & PER_BSD) && (request == PTRACE_SUNATTACH))
-	    || (!(current->personality & PER_BSD) && (request == PTRACE_ATTACH))) {
+	if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH)
+	    || (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
 		unsigned long flags;
 
 		if(child == current) {
@@ -203,9 +203,7 @@
 		pt_succ_return(regs, 0);
 		goto out;
 	}
-	if (!(child->flags & PF_PTRACED)
-	    && ((current->personality & PER_BSD) && (request != PTRACE_SUNATTACH))
-	    && (!(current->personality & PER_BSD) && (request != PTRACE_ATTACH))) {
+	if (!(child->flags & PF_PTRACED)) {
 		pt_error_return(regs, ESRCH);
 		goto out;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)