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

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

msm: smem: initialize remote spinlock in smem_alloc2()



smem_alloc2() might be called before the remote spinlock is initialized.
This causes a null pointer dereference crash when an attempt to lock
the spinlock is made.  Unlike, smem_alloc(), smem_alloc2() modifies shared
memory structures, so locking the spinlock is required under all conditions
to prevent corruption.

Fix the crash by attempting to initialize the spinlock if it is not already
initalized.

Change-Id: Ie943b3dc470648b5948e6d72bc77262176359f2c
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: default avatarJay Chokshi <jchokshi@codeaurora.org>
parent 2cf96f9e
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