From: "Skip Hansen" <[EMAIL PROTECTED]>

For ep0out transfers (rare), be sure to copy the right data to userspace.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>

Index: g26/drivers/usb/gadget/inode.c
===================================================================
--- g26.orig/drivers/usb/gadget/inode.c 2006-08-30 14:49:52.000000000 -0700
+++ g26/drivers/usb/gadget/inode.c      2006-08-31 23:55:44.000000000 -0700
@@ -1032,7 +1032,7 @@ ep0_read (struct file *fd, char __user *
                        else {
                                len = min (len, (size_t)dev->req->actual);
 // FIXME don't call this with the spinlock held ...
-                               if (copy_to_user (buf, &dev->req->buf, len))
+                               if (copy_to_user (buf, dev->req->buf, len))
                                        retval = -EFAULT;
                                clean_req (dev->gadget->ep0, dev->req);
                                /* NOTE userspace can't yet choose to stall */


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to