aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiang Yu <yuq825@gmail.com>2019-09-22 03:49:00 -0400
committerChristian König <christian.koenig@amd.com>2019-10-10 11:05:20 -0400
commitc3d79a83ca10d2026fd1cce096cde2d8e316592e (patch)
treebecc4a84dd5a23fa0e3b9c5951e2e9ee502144b8
parent11bcf5f78905b90baae8fb01e16650664ed0cb00 (diff)
dma-buf/resv: fix exclusive fence get
This causes kernel crash when testing lima driver. Cc: Christian König <christian.koenig@amd.com> Fixes: b8c036dfc66f ("dma-buf: simplify reservation_object_get_fences_rcu a bit") Signed-off-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190922074900.853-1-yuq825@gmail.com Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r--drivers/dma-buf/dma-resv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index 42a8f3f11681..709002515550 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -471,7 +471,7 @@ unlock:
471 if (pfence_excl) 471 if (pfence_excl)
472 *pfence_excl = fence_excl; 472 *pfence_excl = fence_excl;
473 else if (fence_excl) 473 else if (fence_excl)
474 shared[++shared_count] = fence_excl; 474 shared[shared_count++] = fence_excl;
475 475
476 if (!shared_count) { 476 if (!shared_count) {
477 kfree(shared); 477 kfree(shared);