Re: [PATCH v5 2/2] dma-buf: heaps: Introduce a new heap for reserved memory

Maxime Ripard
2025-08-20T15:22:20Z

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

Hi,

On Fri, Aug 08, 2025 at 03:46:21PM +0530, Charan Teja Kalla wrote:
> On 6/17/2025 5:55 PM, Maxime Ripard wrote:
> > +static void carveout_heap_dma_buf_release(struct dma_buf *buf)
> > +{
> > + struct carveout_heap_buffer_priv *buffer_priv = buf->priv;
> > + struct carveout_heap_priv *heap_priv = buffer_priv->heap;
> > + unsigned long len = buffer_priv->num_pages * PAGE_SIZE;
> > +
> > + gen_pool_free(heap_priv->pool, buffer_priv->paddr, len);
>
> Just checking If clearing of the memory is missed before releasing it to
> the free pool. If not, isn't it a leak of data when the heap is being
> used by the multiple apps.
>
> BTW, thanks for these patches.

Thanks for the review. Note that we've since moved to another approach
here:
https://lore.kernel.org/r/20250721-dma-buf-ecc-heap-v7-0-031836e1a942@kernel.org

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]