dma-buf: fix stack corruption in dma_fence_chain_release
authorChristian König <christian.koenig@amd.com>
Thu, 1 Aug 2019 13:11:14 +0000 (15:11 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 5 Aug 2019 15:32:33 +0000 (17:32 +0200)
commit92cb3e5980638a37c56091e605aa837d0af05a9d
tree497f1d420890fefadb79a621d135a6bd468b619a
parent0dbd555a011c2d096a7b7e40c83c5776a7df367c
dma-buf: fix stack corruption in dma_fence_chain_release

We can't free up the chain using recursion or we run into a stack overflow.

Manually free up the dangling chain nodes to avoid recursion.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7bf60c52e093 ("dma-buf: add new dma_fence_chain container v7")
Link: https://patchwork.freedesktop.org/patch/321612/
drivers/dma-buf/dma-fence-chain.c