usbip: vhci_hcd: check rhport before using in vhci_hub_control()

commit 5b22f67611 upstream.

Validate !rhport < 0 before using it to access port_status array.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16:
 - Drop changes to the SetPortFeature
   USB_PORT_FEAT_{SUSPEND,POWER,BH_PORT_RESET} cases
 - Add the "error" label
 - Adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Shuah Khan 2018-04-05 16:31:49 -06:00 • committed by Ben Hutchings
commit 2660b8211d