usbip: vhci_hcd: check rhport before using in vhci_hub_control()
authorShuah Khan <shuahkh@osg.samsung.com>
Thu, 5 Apr 2018 22:31:49 +0000 (16:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2018 19:58:09 +0000 (12:58 -0700)
commitb792b1f7d01ca95db8b39046e2a539def5ffc4f2
treed109ab4886c6231a93b19aa98f1f719baf015cf2
parent4abe5b775a16e131466f40861b90632d719da1b5
usbip: vhci_hcd: check rhport before using in vhci_hub_control()

commit 5b22f676118ff25049382041da0db8012e57c9e8 upstream.

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

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vhci_hcd.c