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

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

diff -u --recursive --new-file v2.3.99-pre5/linux/arch/sparc/kernel/ptrace.c linux/arch/sparc/kernel/ptrace.c
@@ -60,7 +60,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);
@@ -155,7 +155,7 @@
 		pt_error_return(regs, EIO);
 		return;
 	}
-	if (current->personality & PER_BSD)
+	if (current->personality == PER_SUNOS)
 		pt_succ_return (regs, v);
 	else
 		pt_succ_return_linux (regs, v, addr);
@@ -310,8 +310,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) {
@@ -349,9 +349,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)