diff options
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 7a37369f8ea3..ed2ba6eca724 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -57,7 +57,15 @@ struct ip_options { | |||
57 | unsigned char __data[0]; | 57 | unsigned char __data[0]; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) | 60 | struct ip_options_rcu { |
61 | struct rcu_head rcu; | ||
62 | struct ip_options opt; | ||
63 | }; | ||
64 | |||
65 | struct ip_options_data { | ||
66 | struct ip_options_rcu opt; | ||
67 | char data[40]; | ||
68 | }; | ||
61 | 69 | ||
62 | struct inet_request_sock { | 70 | struct inet_request_sock { |
63 | struct request_sock req; | 71 | struct request_sock req; |
@@ -78,7 +86,7 @@ struct inet_request_sock { | |||
78 | acked : 1, | 86 | acked : 1, |
79 | no_srccheck: 1; | 87 | no_srccheck: 1; |
80 | kmemcheck_bitfield_end(flags); | 88 | kmemcheck_bitfield_end(flags); |
81 | struct ip_options *opt; | 89 | struct ip_options_rcu *opt; |
82 | }; | 90 | }; |
83 | 91 | ||
84 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | 92 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) |
@@ -140,7 +148,7 @@ struct inet_sock { | |||
140 | __be16 inet_sport; | 148 | __be16 inet_sport; |
141 | __u16 inet_id; | 149 | __u16 inet_id; |
142 | 150 | ||
143 | struct ip_options *opt; | 151 | struct ip_options_rcu __rcu *inet_opt; |
144 | __u8 tos; | 152 | __u8 tos; |
145 | __u8 min_ttl; | 153 | __u8 min_ttl; |
146 | __u8 mc_ttl; | 154 | __u8 mc_ttl; |