OSDN Git Service

staging: gasket: page table: use GFP_KERNEL for dma_alloc_coherent
authorTodd Poynor <toddpoynor@google.com>
Mon, 17 Sep 2018 12:38:58 +0000 (05:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Sep 2018 11:22:01 +0000 (13:22 +0200)
Flags should be specified for dma_alloc_coherent() call.  Use
GFP_KERNEL, it's fine to sleep here.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gasket/gasket_page_table.c

index 53492f4..71b77da 100644 (file)
@@ -1287,7 +1287,7 @@ int gasket_alloc_coherent_memory(struct gasket_dev *gasket_dev, u64 size,
                return -EINVAL;
 
        mem = dma_alloc_coherent(gasket_get_device(gasket_dev),
-                                num_pages * PAGE_SIZE, &handle, 0);
+                                num_pages * PAGE_SIZE, &handle, GFP_KERNEL);
        if (!mem)
                goto nomem;