Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8159668a authored by Mayank Rana's avatar Mayank Rana
Browse files

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: default avatarMayank Rana <mrana@codeaurora.org>
parent d5809484
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment