Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Qiang Yu and committed by
Chris Wilson
7fbd0782 fb2ee9bf

+1 -1
+1 -1
drivers/dma-buf/dma-resv.c
··· 471 471 if (pfence_excl) 472 472 *pfence_excl = fence_excl; 473 473 else if (fence_excl) 474 - shared[++shared_count] = fence_excl; 474 + shared[shared_count++] = fence_excl; 475 475 476 476 if (!shared_count) { 477 477 kfree(shared);