patch-2.4.23 linux-2.4.23/drivers/usb/host/uhci-debug.h

Next file: linux-2.4.23/drivers/usb/mdc800.c
Previous file: linux-2.4.23/drivers/usb/host/sl811.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/usb/host/uhci-debug.h linux-2.4.23/drivers/usb/host/uhci-debug.h
@@ -545,7 +545,8 @@
 	if (!access_ok(VERIFY_WRITE, buf, nbytes))
 		return -EINVAL;
 
-	copy_to_user(buf, up->data + pos, nbytes);
+	if (copy_to_user(buf, up->data + pos, nbytes))
+		return -EFAULT;
 
 	*ppos += nbytes;
 

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