]> git.baikalelectronics.ru Git - kernel.git/commit
usb: clamp bInterval to allowed range
authorFelipe Balbi <balbi@ti.com>
Tue, 2 Jul 2013 07:50:15 +0000 (10:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 18:49:30 +0000 (11:49 -0700)
commit535e702dc1a0f3da9d30f4bc9c44fe17cea1bff5
treea8f825986d951260305433938aa1e431df4fa2d2
parentd123a341321bf5755e6ea25881a03af8d1c861d0
usb: clamp bInterval to allowed range

bInterval must be within the range 1 - 16
when running at High/Super speed, and within
the range 1 - 255 when running at Full/Low speed.

In order to catch drivers passing a too
large bInterval on Super/High speed scenarios
(thus overflowing urb->interval), let's clamp()
the argument to the allowed ranges.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb.h