aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGregory Herrero <[email protected]>2015-11-05 09:41:40 +0100
committerFelipe Balbi <[email protected]>2015-12-15 09:12:41 -0600
commit26a19ea699060fded98257e65b0ae5272a5ea1da (patch)
treeb5e20b195b70baf3e974bde3dc3e54238ac5eeb5 /scripts
parentc503b38153852d88774b54ae17f7723f68c6dc33 (diff)
usb: dwc2: host: fix use of qtd after free in desc dma mode
When completing non isoc xfer, dwc2_complete_non_isoc_xfer_ddma() is relying on qtd->n_desc to process the corresponding number of descriptors. During the processing of these descriptors, qtd could be unlinked and freed if xfer is done and urb is no more in progress. In this case, dwc2_complete_non_isoc_xfer_ddma() will read again qtd->n_desc whereas qtd has been freed. This will lead to unpredictable results since qtd->n_desc is no more valid value. To avoid this error, return a result != 0 in dwc2_process_non_isoc_desc(), so that dwc2_complete_non_isoc_xfer_ddma() stops desc processing. This has been seen with Slub debug enabled. Acked-by: John Youn <[email protected]> Signed-off-by: Gregory Herrero <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions