diff options
author | Miles Chen <miles.chen@mediatek.com> | 2018-02-22 19:22:20 +0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-02-22 15:02:33 -0800 |
commit | af1da686843750809738c01e153320106e890804 (patch) | |
tree | ed3a996f8f9dce16a0ba24b015a1e16bea5920c1 /kernel/softirq.c | |
parent | a638af00b27266c09ab7ac69141e6f4ac6c00eff (diff) | |
download | linux-af1da686843750809738c01e153320106e890804.tar.bz2 |
dma-debug: fix memory leak in debug_dma_alloc_coherent
Marty reported a memory leakage introduced by commit 3aaabbf1c39e
("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: Marty Faltesek <mfaltesek@google.com>
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/softirq.c')
0 files changed, 0 insertions, 0 deletions