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

Commit 3fccc82a authored by Jeff Hugo's avatar Jeff Hugo
Browse files

soc: qcom: glink_smd_xprt: Fix list access race condition



The channels list for an edge allows a translation from a channel id to
that channel's structure.  Channels are added to the list dynamically.
Adding a channel to the list while another context is scanning the list is
unsafe because list_add() is a non-atomic operation that can be reordered
in hardware such that it is possible for a scan operation to follow an
invalid pointer and go off the list.

Protect the list with a lock to ensure that list adds are mutually
exclusive with lsit scans so that scans do not see invalid state.

CRs-Fixed: 870636
Change-Id: I8c6217a31f59000d83b066623771793d1f0251e6
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent cdecac51
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