Please try this patch instead of the previous one: diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 2c2772e9702a..3516a543450e 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -118,9 +118,10 @@ struct page *__dma_direct_alloc_pages(struct device *dev, size_t size, page = NULL; } } - if (!page) - page = alloc_pages_node(dev_to_node(dev), gfp, page_order); - + if (!page) { + page = alloc_pages_node(local_memory_node(dev_to_node(dev)), + gfp, page_order); + } if (page && !dma_coherent_ok(dev, page_to_phys(page), size)) { __free_pages(page, page_order); page = NULL;