linux_dsm_epyc7002/drivers/dma-buf
Rafael Antognolli 7cec540a72 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 <rafael.antognolli@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473966865-4508-1-git-send-email-rafael.antognolli@intel.com
2016-09-20 17:53:39 +05:30
..
dma-buf.c dma-buf: Wait on the reservation object when sync'ing before CPU access 2016-08-16 12:31:35 +05:30
fence-array.c dma-buf: fix kernel-doc warning and typos 2016-08-17 09:19:28 +05:30
fence.c dma-buf/fence: make fence context 64 bit v2 2016-06-02 08:27:41 +02:00
Kconfig dma-buf/sync_file: improve Kconfig description for Sync Files 2016-07-13 19:52:08 +05:30
Makefile dma-buf/fence: add fence_array fences v6 2016-06-02 09:26:15 +02:00
reservation.c reservation: fix small comment typo 2016-08-22 09:22:09 +02:00
seqno-fence.c dma-buf: Minor coding style fixes 2015-05-21 11:29:59 +05:30
sync_file.c dma-buf/sync_file: Increment refcount of fence when all are signaled. 2016-09-20 17:53:39 +05:30