Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit af1da686 authored by Miles Chen's avatar Miles Chen Committed by Christoph Hellwig
Browse files

dma-debug: fix memory leak in debug_dma_alloc_coherent



Marty reported a memory leakage introduced by commit 3aaabbf1
("lib/dma-debug.c: fix incorrect pfn calculation"). Fix it
by checking the virtual address before allocating the entry.

This patch also use virt_addr_valid() instead of virt_to_page()
to check if a virtual address is linear.

Fixes: 3aaabbf1 ("lib/dma-debug.c: fix incorrect pfn calculation")
Reported-by: default avatarMarty Faltesek <mfaltesek@google.com>
Signed-off-by: default avatarMiles Chen <miles.chen@mediatek.com>
Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent a638af00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment