diff options
| author | Lihua Liu <lihual@codeaurora.org> | 2018-09-11 17:05:37 +0800 |
|---|---|---|
| committer | Lihua Liu <lihual@codeaurora.org> | 2018-09-11 17:15:22 +0800 |
| commit | a7a47ff52fe5bc6636a14192b7ae389599ecc2d0 (patch) | |
| tree | 96ac3af6b868e872f366c451949f577d8f957c3d | |
| parent | dbdc4e0fc9161ed97e91e3f0cb553a181e7ed8b7 (diff) | |
qcacld-2.0: Support non atomic skb allocation
propagation from qcacld-3.0 to qcacld-2.0
Improve reliability of skb allocations from non atomic callers
by letting them sleep.
Change-Id: If5a594519902ebe549fbc1ebd8c0eb97679cdcae
CRs-Fixed: 2312931
| -rw-r--r-- | CORE/SERVICES/COMMON/adf/adf_nbuf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.c b/CORE/SERVICES/COMMON/adf/adf_nbuf.c index 6f45f72687f1..9b1ee4c00314 100644 --- a/CORE/SERVICES/COMMON/adf/adf_nbuf.c +++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.c @@ -198,11 +198,15 @@ __adf_nbuf_alloc(adf_os_device_t osdev, size_t size, int reserve, int align, int { 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_cb; |
