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

Skip to content
Commit af4b1275 authored by Dixon Peterson's avatar Dixon Peterson Committed by Stephen Boyd
Browse files

diag: fix hsic concurrency issue when in MEMORY_DEVICE_MODE



When the logging mode changes to MEMORY_DEVICE_MODE, an array
is used to house the pointers to the data read from the hsic
until the data can be copied to user space. Since the storing
and copying actions access this array in different threads,
access to this array can result in concurrent access by these
threads. Note that the storing access to the array happens in
interrupt context and the copying access happens in process
context.  Use spin_locks to protect agains this concurrency
issue.

Also, there is unnecessary queuing of the hsic read work function
on the work queue. Add checks to remove this unnecessary queuing.

Change-Id: I2835435200bca4086d34c0dfb6e88da473dfff1f
Signed-off-by: default avatarDixon Peterson <dixonp@codeaurora.org>
parent 5f03d311
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