diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-06 20:10:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-06 20:10:15 +0200 |
commit | 7cdb85df6061d001fffd09c6adfbcf20356615e2 (patch) | |
tree | 467294ac9a919bab1c8bfe2282dc84544b6e98b1 /kernel | |
parent | Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc... (diff) | |
parent | dma-mapping: fix false positivse warnings in dma_common_free_remap() (diff) | |
download | linux-7cdb85df6061d001fffd09c6adfbcf20356615e2.tar.xz linux-7cdb85df6061d001fffd09c6adfbcf20356615e2.zip |
Merge tag 'dma-mapping-5.4-1' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping regression fix from Christoph Hellwig:
"Revert an incorret hunk from a patch that caused problems on various
arm boards (Andrey Smirnov)"
* tag 'dma-mapping-5.4-1' of git://git.infradead.org/users/hch/dma-mapping:
dma-mapping: fix false positive warnings in dma_common_free_remap()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/dma/remap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/dma/remap.c b/kernel/dma/remap.c index ca4e5d44b571..c00b9258fa6a 100644 --- a/kernel/dma/remap.c +++ b/kernel/dma/remap.c @@ -87,9 +87,9 @@ void *dma_common_contiguous_remap(struct page *page, size_t size, */ void dma_common_free_remap(void *cpu_addr, size_t size) { - struct page **pages = dma_common_find_pages(cpu_addr); + struct vm_struct *area = find_vm_area(cpu_addr); - if (!pages) { + if (!area || area->flags != VM_DMA_COHERENT) { WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr); return; } |