Commit c3d79a83 authored by Qiang Yu's avatar Qiang Yu Committed by Christian König

dma-buf/resv: fix exclusive fence get

This causes kernel crash when testing lima driver.

Cc: Christian König <christian.koenig@amd.com>
Fixes: b8c036df ("dma-buf: simplify reservation_object_get_fences_rcu a bit")
Signed-off-by: default avatarQiang Yu <yuq825@gmail.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190922074900.853-1-yuq825@gmail.comSigned-off-by: default avatarChristian König <christian.koenig@amd.com>
parent 11bcf5f7
......@@ -471,7 +471,7 @@ int dma_resv_get_fences_rcu(struct dma_resv *obj,
if (pfence_excl)
*pfence_excl = fence_excl;
else if (fence_excl)
shared[++shared_count] = fence_excl;
shared[shared_count++] = fence_excl;
if (!shared_count) {
kfree(shared);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment