Commit c700bdd2 authored by John Stultz's avatar John Stultz
Browse files

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: default avatarJohn 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
parent 0dff32e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment