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

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

diff -urN linux-2.4.18/arch/s390/kernel/ptrace.c linux-2.4.19/arch/s390/kernel/ptrace.c
@@ -341,9 +341,11 @@
 		break;
 	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)