diff options
author | Vegard Nossum <vegard.nossum@gmail.com> | 2008-09-09 00:43:12 -0400 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 09:49:27 -0400 |
commit | 45e3ff82708c65c895d5c5882aff17ecf62a80b5 (patch) | |
tree | 31171009a60298b436b7e838497c16db4a2a2fc6 /include/net/inet_sock.h | |
parent | fe55f6d5c0cfec4a710ef6ff63f162b99d5f7842 (diff) |
net: annotate bitfields in struct inet_sock
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index de0ecc71cf03..cbcda0b0b964 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 | ||
@@ -198,9 +201,12 @@ static inline int inet_sk_ehashfn(const struct sock *sk) | |||
198 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) | 201 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) |
199 | { | 202 | { |
200 | struct request_sock *req = reqsk_alloc(ops); | 203 | struct request_sock *req = reqsk_alloc(ops); |
204 | struct inet_request_sock *ireq = inet_rsk(req); | ||
201 | 205 | ||
202 | if (req != NULL) | 206 | if (req != NULL) { |
203 | inet_rsk(req)->opt = NULL; | 207 | kmemcheck_annotate_bitfield(ireq, flags); |
208 | ireq->opt = NULL; | ||
209 | } | ||
204 | 210 | ||
205 | return req; | 211 | return req; |
206 | } | 212 | } |