mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacmn: Support non atomic skb allocation
Improve reliability of skb allocations from non atomic callers by letting them sleep. Change-Id: If5a594519902ebe549fbc1ebd8c0eb97679cdcae CRs-Fixed: 2127770
This commit is contained in:
parent
b9a7b5ac0d
commit
c6d785d033
1 changed files with 5 additions and 1 deletions
|
|
@ -384,11 +384,15 @@ struct sk_buff *__qdf_nbuf_alloc(qdf_device_t osdev, size_t size, int reserve,
|
|||
{
|
||||
struct sk_buff *skb;
|
||||
unsigned long offset;
|
||||
int flags = GFP_KERNEL;
|
||||
|
||||
if (align)
|
||||
size += (align - 1);
|
||||
|
||||
skb = dev_alloc_skb(size);
|
||||
if (in_interrupt() || irqs_disabled() || in_atomic())
|
||||
flags = GFP_ATOMIC;
|
||||
|
||||
skb = __netdev_alloc_skb(NULL, size, flags);
|
||||
|
||||
if (skb)
|
||||
goto skb_alloc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue