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

Commit f0a45129 authored by Mayank Rana's avatar Mayank Rana
Browse files

dwc3: gadget: Flush dwc_wq with dwc3_gadget_stop() API



composite_unbind() frees cdev, cdev->req and cdev->os_desc_req
which happens with USB composition switch. There is possibility
that USB enumeration is under progress (i.e. ep0 data transfer)
and USB compositon switch is peformed, then composite_setup()
may race against composite_unbind() and results into accessing
cdev->req and cdev->os_desc_req. Fix this issue by flushing
dwc_wq which makes sure that all received ep0 based events are
handled before cdev, cdev->req and cdev->os_desc_req are freed.

Change-Id: I7b1a4cbfcfd5b52b871e49445a160efb4c333b29
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 5bc0e57c
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