Commit 66923a60 authored by Saurabh Sengar's avatar Saurabh Sengar Committed by Scott Wood

qe: Use GFP_ATOMIC while spin_lock_irqsave is held

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: default avatarSaurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: default avatarScott Wood <oss@buserror.net>
parent 713df30b
...@@ -121,7 +121,7 @@ static unsigned long cpm_muram_alloc_common(unsigned long size, ...@@ -121,7 +121,7 @@ static unsigned long cpm_muram_alloc_common(unsigned long size,
goto out2; goto out2;
start = start - GENPOOL_OFFSET; start = start - GENPOOL_OFFSET;
memset_io(cpm_muram_addr(start), 0, size); memset_io(cpm_muram_addr(start), 0, size);
entry = kmalloc(sizeof(*entry), GFP_KERNEL); entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
if (!entry) if (!entry)
goto out1; goto out1;
entry->start = start; entry->start = start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment