patch-2.4.26 linux-2.4.26/arch/x86_64/lib/usercopy.c

Next file: linux-2.4.26/arch/x86_64/mm/fault.c
Previous file: linux-2.4.26/arch/x86_64/lib/csum-partial.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/arch/x86_64/lib/usercopy.c linux-2.4.26/arch/x86_64/lib/usercopy.c
@@ -126,3 +126,11 @@
 		s++;
 	}
 }
+
+unsigned long copy_in_user(void *to, const void *from, unsigned len)
+{
+	if (access_ok(VERIFY_WRITE, to, len) && access_ok(VERIFY_READ, from, len)) { 
+		return copy_user_generic(to, from, len);
+	} 
+	return len;		
+}

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