Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck: (39 commits) signal: fix __send_signal() false positive kmemcheck warning fs: fix do_mount_root() false positive kmemcheck warning fs: introduce __getname_gfp() trace: annotate bitfields in struct ring_buffer_event net: annotate struct sock bitfield c2port: annotate bitfield for kmemcheck net: annotate inet_timewait_sock bitfields ieee1394/csr1212: fix false positive kmemcheck report ieee1394: annotate bitfield net: annotate bitfields in struct inet_sock net: use kmemcheck bitfields API for skbuff kmemcheck: introduce bitfield API kmemcheck: add opcode self-testing at boot x86: unify pte_hidden x86: make _PAGE_HIDDEN conditional kmemcheck: make kconfig accessible for other architectures kmemcheck: enable in the x86 Kconfig kmemcheck: add hooks for the page allocator kmemcheck: add hooks for page- and sg-dma-mappings kmemcheck: don't track page tables ...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user