mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: vidc: Avoid memset of list elements in the buffer entry.
- Due to race condition between free buffer and flush output buffers, invalid buffer is getting accessed sometimes. - Reset all the members in buffer entry except list elements. (cherry picked from commit 8105df366cf6b9f1ddbc15d561fb6a5f12540416) CRs-Fixed: 411197 Change-Id: Id95037f57d7fe4bc88b96f187953194ec838d63b Signed-off-by: Srinu Gorle <sgorle@codeaurora.org> Signed-off-by: Neha Pandey <nehap@codeaurora.org>
This commit is contained in:
parent
d4bc4c74ff
commit
6359f576ab
1 changed files with 5 additions and 1 deletions
|
@ -784,7 +784,11 @@ u32 vcd_free_one_buffer_internal(
|
|||
buf_pool->allocated--;
|
||||
}
|
||||
|
||||
memset(buf_entry, 0, sizeof(struct vcd_buffer_entry));
|
||||
buf_entry->valid = buf_entry->allocated = buf_entry->in_use = 0;
|
||||
buf_entry->alloc = buf_entry->virtual = buf_entry->physical = NULL;
|
||||
buf_entry->sz = 0;
|
||||
memset(&buf_entry->frame, 0, sizeof(struct vcd_frame_data));
|
||||
|
||||
buf_pool->validated--;
|
||||
if (buf_pool->validated == 0)
|
||||
vcd_free_buffer_pool_entries(buf_pool);
|
||||
|
|
Loading…
Reference in a new issue