Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 997694de authored by Skip Hansen's avatar Skip Hansen Committed by Greg Kroah-Hartman
Browse files

gadgetfs patch for ep0out



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

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 53bd6a60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */