[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1408829839-20742-2-git-send-email-_govind@gmx.com>
Date: Sun, 24 Aug 2014 03:07:18 +0530
From: Govindarajulu Varadarajan <_govind@....com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, mgorman@...e.de,
Govindarajulu Varadarajan <_govind@....com>
Subject: [PATCH RFC net-next 1/2] net: skbuff: propagate pfmemalloc to skb
In __netdev_alloc_skb, __netdev_alloc_frag might have allocated page with
flag __GFP_MEMALLOC. But we do not propagate it to the skb.
Signed-off-by: Govindarajulu Varadarajan <_govind@....com>
---
net/core/skbuff.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 163b673..51a3328 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -425,8 +425,14 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
if (likely(data)) {
skb = build_skb(data, fragsz);
- if (unlikely(!skb))
+ if (unlikely(!skb)) {
put_page(virt_to_head_page(data));
+ } else {
+ struct page *page;
+
+ page = virt_to_head_page(data);
+ skb_propagate_pfmemalloc(page, skb);
+ }
}
} else {
skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask,
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists