xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 4 Jul 2018 09:48:53 +0000 (12:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2018 09:39:26 +0000 (11:39 +0200)
commit7499390b8ba5e4c9d378d301f7fd7db9be28f922
tree5b200dc6d7c79eff2688398e57c73ac9b012bb1b
parent55f51e5b4cffc6d98b945868281c67dbf0368c25
xhci: xhci-mem: off by one in xhci_stream_id_to_ring()

commit 313db3d6488bb03b61b99de9dbca061f1fd838e1 upstream.

The > should be >= here so that we don't read one element beyond the end
of the ep->stream_info->stream_rings[] array.

Fixes: e9df17eb1408 ("USB: xhci: Correct assumptions about number of rings per endpoint.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c