Commit 310e158cc3b7a6adf41e778d52be746c4dc88561
Committed by
David S. Miller
1 parent
7ac2908e4b
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
net: respect GFP_DMA in __netdev_alloc_skb()
Few drivers use GFP_DMA allocations, and netdev_alloc_frag() doesn't allocate pages in DMA zone. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
net/core/skbuff.c
... | ... | @@ -353,7 +353,7 @@ |
353 | 353 | unsigned int fragsz = SKB_DATA_ALIGN(length + NET_SKB_PAD) + |
354 | 354 | SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); |
355 | 355 | |
356 | - if (fragsz <= PAGE_SIZE && !(gfp_mask & __GFP_WAIT)) { | |
356 | + if (fragsz <= PAGE_SIZE && !(gfp_mask & (__GFP_WAIT | GFP_DMA))) { | |
357 | 357 | void *data = netdev_alloc_frag(fragsz); |
358 | 358 | |
359 | 359 | if (likely(data)) { |