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

Commit 97882a07 authored by Udipto Goswami's avatar Udipto Goswami
Browse files

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: default avatarUdipto Goswami <ugoswami@codeaurora.org>
parent 74809ce2
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