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:Jeffrey Hugo <jhugo@codeaurora.org> Signed-off-by:
Jay Chokshi <jchokshi@codeaurora.org>
Loading
Please register or sign in to comment