diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-06 11:10:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-06 11:10:15 -0700 |
commit | 7cdb85df6061d001fffd09c6adfbcf20356615e2 (patch) | |
tree | 467294ac9a919bab1c8bfe2282dc84544b6e98b1 /kernel | |
parent | 43b815c6a8e7dbccb5b8bd9c4b099c24bc22d135 (diff) | |
parent | 2cf2aa6a69db0b17b3979144287af8775c1c1534 (diff) |
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; } |