* [PATCH v3] usbdevfs: Fix broken scatter-gather transfer
@ 2012-10-13 10:20 Henrik Rydberg
2012-10-14 15:48 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Henrik Rydberg @ 2012-10-13 10:20 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Hans de Goede, Alan Stern, Peter Stuge, linux-usb, linux-kernel,
Henrik Rydberg, stable
The handling of large output bulk transfers is broken; the same user
page is read over and over again. Fixed with this patch.
Cc: stable@kernel.org
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
Hi Greg,
Here is the formal and third version of the patch. Version two still
made me nervous, so I moved the increment to where it is clear that
the buffer pointer is never referenced again later in the function. I
still kept the ACKS, hope that is alright with everyone.
Thanks,
Henrik
drivers/usb/core/devio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index ebb8a9d..7f75343 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1348,6 +1348,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
ret = -EFAULT;
goto error;
}
+ uurb->buffer += u;
}
totlen -= u;
}
--
1.7.12.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] usbdevfs: Fix broken scatter-gather transfer
2012-10-13 10:20 [PATCH v3] usbdevfs: Fix broken scatter-gather transfer Henrik Rydberg
@ 2012-10-14 15:48 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2012-10-14 15:48 UTC (permalink / raw)
To: Henrik Rydberg
Cc: Greg Kroah-Hartman, Alan Stern, Peter Stuge, linux-usb,
linux-kernel, stable
Hi,
On 10/13/2012 12:20 PM, Henrik Rydberg wrote:
> The handling of large output bulk transfers is broken; the same user
> page is read over and over again. Fixed with this patch.
>
> Cc: stable@kernel.org
> Acked-by: Peter Stuge <peter@stuge.se>
> Acked-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> ---
> Hi Greg,
>
> Here is the formal and third version of the patch. Version two still
> made me nervous,
And it should, as as said before I believe it would have broken large
input transfers ...
so I moved the increment to where it is clear that
> the buffer pointer is never referenced again later in the function. I
> still kept the ACKS, hope that is alright with everyone.
Unlike the previous one, this version should work, so yes it may keep
my ACK :)
Regards,
Hans
>
> Thanks,
> Henrik
>
> drivers/usb/core/devio.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
> index ebb8a9d..7f75343 100644
> --- a/drivers/usb/core/devio.c
> +++ b/drivers/usb/core/devio.c
> @@ -1348,6 +1348,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
> ret = -EFAULT;
> goto error;
> }
> + uurb->buffer += u;
> }
> totlen -= u;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-14 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-13 10:20 [PATCH v3] usbdevfs: Fix broken scatter-gather transfer Henrik Rydberg
2012-10-14 15:48 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox