Thinh Nguyen 5d187c0454 usb: dwc3: gadget: Don't setup more than requested
The SG list may be set up with entry size more than the requested
length. Check the usb_request->length and make sure that we don't setup
the TRBs to send/receive more than requested. This case may occur when
the SG entry is allocated up to a certain minimum size, but the request
length is less than that. It can also occur when the request is reused
for a different request length.

Cc: <stable@vger.kernel.org> # v4.18+
Fixes: a31e63b608ff ("usb: dwc3: gadget: Correct handling of scattergather lists")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-08-17 15:19:02 +03:00
..
2020-07-10 08:55:17 +02:00
2020-07-20 09:41:30 +02:00
2020-08-07 13:00:53 -07:00
2020-07-29 16:48:02 +02:00
2020-08-05 12:13:10 -07:00
2020-07-10 08:55:17 +02:00
2020-08-06 14:56:11 -07:00
2020-08-05 12:13:10 -07:00
2020-07-28 17:33:10 +02:00
2019-09-02 19:20:57 +02:00