Prima: Use GFP_ATOMIC flag while doing kmalloc in atomic ctx
Use GFP_ATOMIC flag while doing kmalloc in atomic context or
IRQs are disabled.
CRs-Fixed: 894515
Change-Id: I30ff342e77829c5ff134d31edfc20a2aff3b45bc
diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c
index 39d46c2..d0d69e7 100644
--- a/CORE/VOSS/src/vos_memory.c
+++ b/CORE/VOSS/src/vos_memory.c
@@ -198,7 +198,7 @@
return NULL;
}
- if (in_interrupt())
+ if (in_interrupt() || irqs_disabled() || in_atomic())
{
flags = GFP_ATOMIC;
}