1
0
Fork 0

gadgetfs patch for ep0out

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

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hifive-unleashed-5.1
Skip Hansen 2006-09-01 15:26:27 -07:00 committed by Greg Kroah-Hartman
parent 53bd6a601a
commit 997694defd
1 changed files with 1 additions and 1 deletions

View File

@ -1015,7 +1015,7 @@ ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
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 */