soc: qcom: smp2p: Copy the entry name out of smem for comparison
Shared memory is configured as device memory, and thus has specific access
requirements. Functions like strcmp() are not guaranteed to do the proper
accesses. Searching for a SMP2P entry involves a strcmp() call with the
entry name stored in shared memory used as one of the parameters.
To ensure safe device memory accesses, use a safe memcpy function to copy
the entry name into local memory, and use that copy for the comparison.
Change-Id: I3edb236090ce21201330485acd54c6de18ece3b6
Signed-off-by:
Jeffrey Hugo <jhugo@codeaurora.org>
Loading
Please register or sign in to comment