aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 16:09:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 16:09:51 -0400
commitb3fec0fe35a4ff048484f1408385a27695d4273b (patch)
tree088c23f098421ea681d9976a83aad73d15be1027 /include/net
parente1f5b94fd0c93c3e27ede88b7ab652d086dc960f (diff)
parent722f2a6c87f34ee0fd0130a8cf45f81e0705594a (diff)
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 ...
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inet_sock.h14
-rw-r--r--include/net/inet_timewait_sock.h5
-rw-r--r--include/net/sock.h2
3 files changed, 16 insertions, 5 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 20a6957af870..47004f35cc7e 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -17,6 +17,7 @@
17#define _INET_SOCK_H 17#define _INET_SOCK_H
18 18
19 19
20#include <linux/kmemcheck.h>
20#include <linux/string.h> 21#include <linux/string.h>
21#include <linux/types.h> 22#include <linux/types.h>
22#include <linux/jhash.h> 23#include <linux/jhash.h>
@@ -66,14 +67,16 @@ struct inet_request_sock {
66 __be32 loc_addr; 67 __be32 loc_addr;
67 __be32 rmt_addr; 68 __be32 rmt_addr;
68 __be16 rmt_port; 69 __be16 rmt_port;
69 u16 snd_wscale : 4, 70 kmemcheck_bitfield_begin(flags);
70 rcv_wscale : 4, 71 u16 snd_wscale : 4,
72 rcv_wscale : 4,
71 tstamp_ok : 1, 73 tstamp_ok : 1,
72 sack_ok : 1, 74 sack_ok : 1,
73 wscale_ok : 1, 75 wscale_ok : 1,
74 ecn_ok : 1, 76 ecn_ok : 1,
75 acked : 1, 77 acked : 1,
76 no_srccheck: 1; 78 no_srccheck: 1;
79 kmemcheck_bitfield_end(flags);
77 struct ip_options *opt; 80 struct ip_options *opt;
78}; 81};
79 82
@@ -199,9 +202,12 @@ static inline int inet_sk_ehashfn(const struct sock *sk)
199static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) 202static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops)
200{ 203{
201 struct request_sock *req = reqsk_alloc(ops); 204 struct request_sock *req = reqsk_alloc(ops);
205 struct inet_request_sock *ireq = inet_rsk(req);
202 206
203 if (req != NULL) 207 if (req != NULL) {
204 inet_rsk(req)->opt = NULL; 208 kmemcheck_annotate_bitfield(ireq, flags);
209 ireq->opt = NULL;
210 }
205 211
206 return req; 212 return req;
207} 213}
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 4b8ece22b8e9..b63b80fac567 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -16,6 +16,7 @@
16#define _INET_TIMEWAIT_SOCK_ 16#define _INET_TIMEWAIT_SOCK_
17 17
18 18
19#include <linux/kmemcheck.h>
19#include <linux/list.h> 20#include <linux/list.h>
20#include <linux/module.h> 21#include <linux/module.h>
21#include <linux/timer.h> 22#include <linux/timer.h>
@@ -127,10 +128,12 @@ struct inet_timewait_sock {
127 __be32 tw_rcv_saddr; 128 __be32 tw_rcv_saddr;
128 __be16 tw_dport; 129 __be16 tw_dport;
129 __u16 tw_num; 130 __u16 tw_num;
131 kmemcheck_bitfield_begin(flags);
130 /* And these are ours. */ 132 /* And these are ours. */
131 __u8 tw_ipv6only:1, 133 __u8 tw_ipv6only:1,
132 tw_transparent:1; 134 tw_transparent:1;
133 /* 15 bits hole, try to pack */ 135 /* 14 bits hole, try to pack */
136 kmemcheck_bitfield_end(flags);
134 __u16 tw_ipv6_offset; 137 __u16 tw_ipv6_offset;
135 unsigned long tw_ttd; 138 unsigned long tw_ttd;
136 struct inet_bind_bucket *tw_tb; 139 struct inet_bind_bucket *tw_tb;
diff --git a/include/net/sock.h b/include/net/sock.h
index 010e14a93c92..95bd3fd75f94 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -218,9 +218,11 @@ struct sock {
218#define sk_hash __sk_common.skc_hash 218#define sk_hash __sk_common.skc_hash
219#define sk_prot __sk_common.skc_prot 219#define sk_prot __sk_common.skc_prot
220#define sk_net __sk_common.skc_net 220#define sk_net __sk_common.skc_net
221 kmemcheck_bitfield_begin(flags);
221 unsigned char sk_shutdown : 2, 222 unsigned char sk_shutdown : 2,
222 sk_no_check : 2, 223 sk_no_check : 2,
223 sk_userlocks : 4; 224 sk_userlocks : 4;
225 kmemcheck_bitfield_end(flags);
224 unsigned char sk_protocol; 226 unsigned char sk_protocol;
225 unsigned short sk_type; 227 unsigned short sk_type;
226 int sk_rcvbuf; 228 int sk_rcvbuf;