ANDROID: dma-heap: Add proper kref handling on dma-buf heaps
Add proper refcounting on the dma_heap structure. While existing heaps are built-in, we may eventually have heaps loaded from modules, and we'll need to be able to properly handle the references to the heaps Also moves minor tracking into the heap structure so we can properly free things. Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Andrew F. Davis <afd@ti.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Liam Mark <lmark@codeaurora.org> Cc: Laura Abbott <labbott@kernel.org> Cc: Brian Starkey <Brian.Starkey@arm.com> Cc: Hridya Valsaraju <hridya@google.com> Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by:John Stultz <john.stultz@linaro.org> Change-Id: I9f9e27f640c926882a639d6ad5dc3019d7e2c2b0 Link: https://lore.kernel.org/lkml/20200725032633.125006-1-john.stultz@linaro.org/T/#u Bug: 154341375 --- v2: Fix potential race with kref_put being called while another cpu was scanning the list to take a ref, pointed out by Hridya
Loading
Please sign in to comment