summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-08-12 16:42:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-07 18:55:07 +0200
commit8ccf3623598b2dc13861c6392cb540a9543d9a05 (patch)
tree0d807bfc153711b2903777cc3de1fb67951f0eb9 /arch/mips
parent86906603260add5f97829cb8bc72382cc09eae15 (diff)
dma-buf/sw_sync: Synchronize signal vs syncpt free
[ Upstream commit d3c6dd1fb30d3853c2012549affe75c930f4a2f9 ] During release of the syncpt, we remove it from the list of syncpt and the tree, but only if it is not already been removed. However, during signaling, we first remove the syncpt from the list. So, if we concurrently free and signal the syncpt, the free may decide that it is not part of the tree and immediately free itself -- meanwhile the signaler goes on to use the now freed datastructure. In particular, we get struck by commit 0e2f733addbf ("dma-buf: make dma_fence structure a bit smaller v2") as the cb_list is immediately clobbered by the kfree_rcu. v2: Avoid calling into timeline_fence_release() from under the spinlock Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111381 Fixes: d3862e44daa7 ("dma-buf/sw-sync: Fix locking around sync_timeline lists") References: 0e2f733addbf ("dma-buf: make dma_fence structure a bit smaller v2") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Sean Paul <seanpaul@chromium.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Christian König <christian.koenig@amd.com> Cc: <stable@vger.kernel.org> # v4.14+ Acked-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190812154247.20508-1-chris@chris-wilson.co.uk Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips')
0 files changed, 0 insertions, 0 deletions