msm: vidc: Fix race condition in DCVS
The DCVS algorithm iterates over the registered buffer
list to get the count of buffers held in driver, without
holding a lock. This causes a race condition, since driver
can can unmap the buffer and delete the node from the
registered list, if it gets dqbuf on the buffer from the client.
To avoid this race condition, acquire registeredbufs.lock
while iterating over the registered buffer list in DCVS.
Change-Id: I94715ccae9dc34dd2f4d9cc12670c1e01086a3c5
Signed-off-by:
Arun Menon <avmenon@codeaurora.org>
Loading
Please register or sign in to comment