]> git.baikalelectronics.ru Git - kernel.git/commit
USB: fix sign-extension bug in the hub driver
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 24 Jan 2013 20:04:13 +0000 (15:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jan 2013 22:03:56 +0000 (14:03 -0800)
commita9c70e1947aaa99bf5ebfea709fb4d407e26731b
tree26e79c17b43906807b735dd41b8f5edf3a78ff75
parent54924c0567ce22e3f70278d809d948a44a820732
USB: fix sign-extension bug in the hub driver

This patch (as1646) fixes a long-standing bug in the USB hub driver.
Upon conversion from char to unsigned long, the bytes in the status
buffer are subject to unwanted sign extension.  The bytes should be
declared as u8 rather than char, to prevent this.

This effects of this bug are minimal.  The hub driver may end up doing
a little unnecessary extra work because it thinks events have occurred
on some ports when they really haven't.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.h