diff options
author | Rafael Antognolli <[email protected]> | 2016-09-15 12:14:25 -0700 |
---|---|---|
committer | Sumit Semwal <[email protected]> | 2016-09-20 17:53:39 +0530 |
commit | 7cec540a724654b6b046200c117bb98ea1bc5d04 (patch) | |
tree | 21db6328285001e19b6eb1fb62a6f685e3e48dac /lib/mpi/mpi-bit.c | |
parent | 699fbeeac4668ba921a5f588736a56b332bd31c4 (diff) |
dma-buf/sync_file: Increment refcount of fence when all are signaled.
When we merge several fences, if all of them are signaled already, we
still keep one of them. So instead of using add_fence(), which will not
increase the refcount of signaled fences, we should explicitly call
fence_get() for the fence we are keeping.
This patch fixes a kernel panic that can be triggered by creating a fence
that is expired (or increasing the timeline until it expires), then
creating a merged fence out of it, and deleting the merged fence. This
will make the original expired fence's refcount go to zero.
Testcase: igt/sw_sync/sync_expired_merge
Signed-off-by: Rafael Antognolli <[email protected]>
Reviewed-by: Chris Wilson <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Sumit Semwal <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions