dwc3-msm: Check USB Endpoint status before queueing endless request
TRB Pool is allocated and de-allocated per endpoint when USB endpoint
is enabled and disabled respectively. In some instance, it has been
observed that usb_ep_disable() (for rmnet case, (u_bam.c) it is called
from set_alt or resume context i.e. interrupt context) and usb_ep_queue()
(for rmnet case, (u_bam.c) it is called from work queue context) are
racing for USB endless endpoint when USB bus suspend and resume is
happening quickly. It is causing NULL pointer dereference while accessing
TRB pool. Fix this issue by moving check if USB endpoint is enable or not
after acquiring dwc3->lock and before calling __dwc3_msm_ep_queue() which
prepares endless TRB.
CRs-Fixed: 986071
Change-Id: I842f6a82f3c454111ba68661cf835e86022e3e18
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment