patch "xhci: xhci-mem: off by one in xhci_stream_id_to_ring()" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
313db3d6488bb03b61b99de9dbca061f1fd838e1Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Wed, 4 Jul 2018 12:48:53 +0300
Subject: xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
The > should be >= here so that we don't read one element beyond the end of the ep->stream_info->stream_rings[] array.
--- drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-mem.c +1 -1
@@ -595,7 +595,7 @@ struct xhci_ring *xhci_stream_id_to_ring(if (!ep->stream_info)return NULL ; -if (stream_id > ep->stream_info->num_streams) +if (stream_id >= ep->stream_info->num_streams)return NULL ;return ep->stream_info->stream_rings[stream_id]; }
Signature · 1 line
2.18.0