qe: Use GFP_ATOMIC while spin_lock_irqsave is held
authorSaurabh Sengar <saurabh.truth@gmail.com>
Sun, 24 Jan 2016 06:54:06 +0000 (12:24 +0530)
committerScott Wood <oss@buserror.net>
Wed, 9 Mar 2016 16:44:13 +0000 (10:44 -0600)
cpm_muram_alloc_common is called twice and both the times
spin_lock_irqsave is held.
Using GFP_KERNEL can sleep in spin_lock_irqsave context and cause
deadlock

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: Scott Wood <oss@buserror.net>
drivers/soc/fsl/qe/qe_common.c

index e18159acfe454566221aeaa377b84930c082f120..41eff805a9041c879627b96395a584e545960b5f 100644 (file)
@@ -121,7 +121,7 @@ static unsigned long cpm_muram_alloc_common(unsigned long size,
                goto out2;
        start = start - GENPOOL_OFFSET;
        memset_io(cpm_muram_addr(start), 0, size);
-       entry = kmalloc(sizeof(*entry), GFP_KERNEL);
+       entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
        if (!entry)
                goto out1;
        entry->start = start;