aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
AgeCommit message (Expand)AuthorFilesLines
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+267
-4.19.y Linux kernel stable treeStable Group
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2021-06-24 12:47:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-28 11:12:16 +0200
commit19f51c2529339280d2c8c6427cd3e21ddf1ac3f8 (patch)
tree07ee9577d7112fc20b2ab88edf53634fa754cbe0
parent83bdcfbd968bcc91a0632b7b625e4a9b0cba5e0d (diff)
downloadlinux-19f51c2529339280d2c8c6427cd3e21ddf1ac3f8.tar.gz
dma-buf/sync_file: Don't leak fences on merge failure
commit ffe000217c5068c5da07ccb1c0f8cce7ad767435 upstream. Each add_fence() call does a dma_fence_get() on the relevant fence. In the error path, we weren't calling dma_fence_put() so all those fences got leaked. Also, in the krealloc_array failure case, we weren't freeing the fences array. Instead, ensure that i and fences are always zero-initialized and dma_fence_put() all the fences and kfree(fences) on every error path. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Christian König <christian.koenig@amd.com> Fixes: a02b9dc90d84 ("dma-buf/sync_file: refactor fence storage in struct sync_file") Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Cc: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210624174732.1754546-1-jason@jlekstrand.net Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>