aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 8134c00df6c2..6b0ff396fa9d 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -41,7 +41,6 @@
41#include <linux/module.h> 41#include <linux/module.h>
42#include <linux/types.h> 42#include <linux/types.h>
43#include <linux/kernel.h> 43#include <linux/kernel.h>
44#include <linux/kmemcheck.h>
45#include <linux/mm.h> 44#include <linux/mm.h>
46#include <linux/interrupt.h> 45#include <linux/interrupt.h>
47#include <linux/in.h> 46#include <linux/in.h>
@@ -234,14 +233,12 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
234 shinfo = skb_shinfo(skb); 233 shinfo = skb_shinfo(skb);
235 memset(shinfo, 0, offsetof(struct skb_shared_info, dataref)); 234 memset(shinfo, 0, offsetof(struct skb_shared_info, dataref));
236 atomic_set(&shinfo->dataref, 1); 235 atomic_set(&shinfo->dataref, 1);
237 kmemcheck_annotate_variable(shinfo->destructor_arg);
238 236
239 if (flags & SKB_ALLOC_FCLONE) { 237 if (flags & SKB_ALLOC_FCLONE) {
240 struct sk_buff_fclones *fclones; 238 struct sk_buff_fclones *fclones;
241 239
242 fclones = container_of(skb, struct sk_buff_fclones, skb1); 240 fclones = container_of(skb, struct sk_buff_fclones, skb1);
243 241
244 kmemcheck_annotate_bitfield(&fclones->skb2, flags1);
245 skb->fclone = SKB_FCLONE_ORIG; 242 skb->fclone = SKB_FCLONE_ORIG;
246 refcount_set(&fclones->fclone_ref, 1); 243 refcount_set(&fclones->fclone_ref, 1);
247 244
@@ -301,7 +298,6 @@ struct sk_buff *__build_skb(void *data, unsigned int frag_size)
301 shinfo = skb_shinfo(skb); 298 shinfo = skb_shinfo(skb);
302 memset(shinfo, 0, offsetof(struct skb_shared_info, dataref)); 299 memset(shinfo, 0, offsetof(struct skb_shared_info, dataref));
303 atomic_set(&shinfo->dataref, 1); 300 atomic_set(&shinfo->dataref, 1);
304 kmemcheck_annotate_variable(shinfo->destructor_arg);
305 301
306 return skb; 302 return skb;
307} 303}
@@ -357,7 +353,7 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
357 */ 353 */
358void *netdev_alloc_frag(unsigned int fragsz) 354void *netdev_alloc_frag(unsigned int fragsz)
359{ 355{
360 return __netdev_alloc_frag(fragsz, GFP_ATOMIC | __GFP_COLD); 356 return __netdev_alloc_frag(fragsz, GFP_ATOMIC);
361} 357}
362EXPORT_SYMBOL(netdev_alloc_frag); 358EXPORT_SYMBOL(netdev_alloc_frag);
363 359
@@ -370,7 +366,7 @@ static void *__napi_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
370 366
371void *napi_alloc_frag(unsigned int fragsz) 367void *napi_alloc_frag(unsigned int fragsz)
372{ 368{
373 return __napi_alloc_frag(fragsz, GFP_ATOMIC | __GFP_COLD); 369 return __napi_alloc_frag(fragsz, GFP_ATOMIC);
374} 370}
375EXPORT_SYMBOL(napi_alloc_frag); 371EXPORT_SYMBOL(napi_alloc_frag);
376 372
@@ -1283,7 +1279,6 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
1283 if (!n) 1279 if (!n)
1284 return NULL; 1280 return NULL;
1285 1281
1286 kmemcheck_annotate_bitfield(n, flags1);
1287 n->fclone = SKB_FCLONE_UNAVAILABLE; 1282 n->fclone = SKB_FCLONE_UNAVAILABLE;
1288 } 1283 }
1289 1284