Browse Source

qcacmn: In qdf malloc use GFP_ATOMIC if in_atomic is set

Currently GFP_KERNEL flag is used to get memory in qdf malloc
even if in_atomic is set.

So in qdf malloc use GFP_ATOMIC if in_atomic is set.

Change-Id: I1992ab4f6c868fcc18285c5cca9c9997433936bf
CRs-Fixed: 1117206
Abhishek Singh 8 years ago
parent
commit
f71721f8ae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qdf/linux/src/qdf_mem.c

+ 1 - 1
qdf/linux/src/qdf_mem.c

@@ -1086,7 +1086,7 @@ void *qdf_mem_malloc(size_t size)
 {
 	int flags = GFP_KERNEL;
 
-	if (in_interrupt() || irqs_disabled())
+	if (in_interrupt() || irqs_disabled() || in_atomic())
 		flags = GFP_ATOMIC;
 
 	return kzalloc(size, flags);