msm: vidc: Protect debug_buffer access in info_read with lock

Serialize core_info_read & inst_info_read with lock so that
multiple concurrent threads do not cause the write to
overflow. Also have the bound check to avoid overflow in
write_str function..

Change-Id: Ia18a4b94cafd69af1d367861f2499fc202f18e9f
Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
3 files changed