diag: Fix race condition in diag mempool

Diag driver manages memory using memory pools. Allocation and
de-allocation of memory depends on global count variables. This
patch adds lock in allocation/free functions to protect those
global variables.

Change-Id: I908687c0ccb51c7901dfb3559262046abd2e8e27
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
2 files changed