aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2012-03-23 19:59:33 -0400
committerDavid S. Miller <davem@davemloft.net>2012-03-25 13:29:58 -0400
commit50269e19ad990e79eeda101fc6df80cffd5d4831 (patch)
tree903d80ba1b1fc0eb15e122a8c12a72f72e7ed2de /include/linux/skbuff.h
parent0015e551edb1d28191567d8a7d1ce5edda404ced (diff)
net: add a truesize parameter to skb_add_rx_frag()
skb_add_rx_frag() API is misleading. Network skbs built with this helper can use uncharged kernel memory and eventually stress/crash machine in OOM. Add a 'truesize' parameter and then fix drivers in followup patches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index a2b9953b582d..681a18799140 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1244,7 +1244,7 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
1244} 1244}
1245 1245
1246extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, 1246extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
1247 int off, int size); 1247 int off, int size, unsigned int truesize);
1248 1248
1249#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) 1249#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
1250#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb)) 1250#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb))