usb: f_qdss: Fix race between usb_connect_work and qdss_disable
Currently in the HW path implementation of qdss, if
set_qdss_data_connection is executing & within that timeframe a
composition switch was issued, it will start executing
qdss_disable where the disconnect_work is queued. But as
set_qdss_data_connection was still executing which is part of
connect_work, it will go ahead as try to do usb_ep_queue. This
is because we never cleared connect_work which is why it would
still be executing in workqueue context. This will lead the
controller to access invalid addresses which would lead to SMMU
fault.
Fix this by doing ep_queue only after checking usb_connected
is set & doing this under spinlock protection.
Change-Id: Ib39040ec381a464854640145e2bf0b5bc8e1ef7a
Signed-off-by:
Udipto Goswami <ugoswami@codeaurora.org>
Loading
Please register or sign in to comment