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

Skip to content
Commit cb68e5fb authored by Jeff Hugo's avatar Jeff Hugo Committed by Stephen Boyd
Browse files

msm: smem: init remote spinlocks before handing out reference



The private API smem_get_remote_spinlock() is used by related modules to
get a reference to the remote spinlock for the purposes of unit testing.
smem_get_remote_spinlock() does not check to see if the spinlock is
initialized before handing out the reference, which could cause a crash
if the API is called before the spinlock is initialized.

Fix these possible crashes by checking if the spinlock is initialized
before handing out the reference.  If the check fails, initialize the
spinlock before returning the reference.

Change-Id: Ib407f5123cb540d58cef9260c8ebb9b81219c6d6
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent 0eebd0e7
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