cnss_prealloc: replace in_atomic() with proper API
According to kernel comment for in_atomic(), it's incorrect to use it outside core kernel code. To follow this rule, replace (irqs_disabled() || in_atomic()) with (!preemptible()) when getting GFP flags. Change-Id: I7cdb28a7f12ffd60216c7bc1921a277de6113cb5 CRs-Fixed: 3273779
This commit is contained in:

committed by
Madan Koyyalamudi

parent
865b5ac35b
commit
a5a88a8d75
@@ -195,8 +195,7 @@ void *wcnss_prealloc_get(size_t size)
|
||||
gfp_t gfp_mask = __GFP_ZERO;
|
||||
int i;
|
||||
|
||||
if (in_interrupt() || irqs_disabled() ||
|
||||
in_atomic() || rcu_preempt_depth())
|
||||
if (in_interrupt() || !preemptible() || rcu_preempt_depth())
|
||||
gfp_mask |= GFP_ATOMIC;
|
||||
else
|
||||
gfp_mask |= GFP_KERNEL;
|
||||
|
Reference in New Issue
Block a user