Re: usb: UHCI: fix pkt size in TD for a non-aligned sg element

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 21-06-2013 15:00, Denis V. Lunev wrote:

From: Konstantin Filatov <kfilatov@xxxxxxxxxxxxx>

Commit 689d6eac

   Please also specify that commit's summary line in parens.

introduced an implementation of scatter-gather list
for UHCI. This  implementation has a bug in case when a non-last sg
element was not aligned by TD's max-pkt-size. This bug was latent
till commit 2851784f

   And this one too.

which initializes sg_table and enables using
the implementation.

The bug can be easily reproduced with Gadget Zero in full_speed mode
connected to a host with UHCI controller by the standard test from
tools/usb/ with command line
   testusb -a -t 7 -c 2000 -s 4096 -v 41
The test crashes with SIGBUS.

This patch shortens TD's packet not only for the last TD in sg list,
but also for the last TD in sg element.

Signed-off-by: Konstantin Filatov <kfilatov@xxxxxxxxxxxxx>
Signed-off-by: Denis V. Lunev <den@xxxxxxxxxx>
CC: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
CC: linux-usb@xxxxxxxxxxxxxxx

WBR, Sergei


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux