patch-2.4.19 linux-2.4.19/arch/s390x/kernel/ptrace.c

Next file: linux-2.4.19/arch/s390x/kernel/reipl.S
Previous file: linux-2.4.19/arch/s390x/kernel/process.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/s390x/kernel/ptrace.c linux-2.4.19/arch/s390x/kernel/ptrace.c
@@ -357,9 +357,10 @@
 
 	case PTRACE_PEEKUSR_AREA:
 	case PTRACE_POKEUSR_AREA:
-		if((ret=copy_from_user(&parea,(void *)addr,sizeof(parea)))==0)  
-		   ret=copy_user(child,parea.kernel_addr,parea.process_addr,
+		if(copy_from_user(&parea,(void *)addr,sizeof(parea)) == 0)  
+			ret=copy_user(child,parea.kernel_addr,parea.process_addr,
 				 parea.len,1,(request==PTRACE_POKEUSR_AREA));
+		else ret = -EFAULT;
 		break;
 	default:
 		ret = -EIO;

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