diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-18 05:16:55 +0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-18 05:16:55 +0400 |
| commit | 4b337c5f245b6587ba844ac7bb13c313a2912f7b (patch) | |
| tree | 999c6a6580b76a083c8efb9dabff709d1c49fcd0 /net/core | |
| parent | 492b057c426e4aa747484958e18e9da29003985d (diff) | |
| parent | 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 (diff) | |
| download | linux-4b337c5f245b6587ba844ac7bb13c313a2912f7b.tar.xz | |
Merge commit 'origin/master' into next
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/skbuff.c | 8 | ||||
| -rw-r--r-- | net/core/sock.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1a94a3037370..5c93435b0347 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -39,6 +39,7 @@ #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> +#include <linux/kmemcheck.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/in.h> @@ -201,6 +202,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, skb->data = data; skb_reset_tail_pointer(skb); skb->end = skb->tail + size; + kmemcheck_annotate_bitfield(skb, flags1); + kmemcheck_annotate_bitfield(skb, flags2); /* make sure we initialize shinfo sequentially */ shinfo = skb_shinfo(skb); atomic_set(&shinfo->dataref, 1); @@ -217,6 +220,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, struct sk_buff *child = skb + 1; atomic_t *fclone_ref = (atomic_t *) (child + 1); + kmemcheck_annotate_bitfield(child, flags1); + kmemcheck_annotate_bitfield(child, flags2); skb->fclone = SKB_FCLONE_ORIG; atomic_set(fclone_ref, 1); @@ -635,6 +640,9 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) n = kmem_cache_alloc(skbuff_head_cache, gfp_mask); if (!n) return NULL; + + kmemcheck_annotate_bitfield(n, flags1); + kmemcheck_annotate_bitfield(n, flags2); n->fclone = SKB_FCLONE_UNAVAILABLE; } diff --git a/net/core/sock.c b/net/core/sock.c index 06e26b77ad9e..b0ba569bc973 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -945,6 +945,8 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, sk = kmalloc(prot->obj_size, priority); if (sk != NULL) { + kmemcheck_annotate_bitfield(sk, flags); + if (security_sk_alloc(sk, family, priority)) goto out_free; |
