]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: fix integer overflow
authorOliver Neukum <oliver@neukum.org>
Wed, 17 Oct 2012 08:16:16 +0000 (10:16 +0200)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 23 Oct 2012 22:43:38 +0000 (15:43 -0700)
commit48cc0d6d0b70823bd08b4d895e68fc4851d24544
treeaf6f9686ebd8e07928013eeee45bc5b0f4e1af21
parent93e2aad1a1fd8af2ed88a393d5dc3c490ff04cbd
xhci: fix integer overflow

xhci_service_interval_to_ns() returns long long
to avoid an overflow. However, the type cast happens
too late. The fix is to force ULL from the beginning.

This patch should be backported to kernels as old as 3.5, that contain
the commit 8cd07961bcc2b8b748ba710daece7d9ef7eb4c42 "xhci: Add Intel
U1/U2 timeout policy."

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: stable@vger.kernel.org
drivers/usb/host/xhci.c