diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-11-10 08:21:08 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-11-10 08:21:08 +0100 |
| commit | b5cd3b51e247473e290be5cd09e77171e466cd89 (patch) | |
| tree | ac8c87e1b38f61a4c879c574dc9373db41f3df01 /include/net/inet_sock.h | |
| parent | x86/platform/UV: Convert timers to use timer_setup() (diff) | |
| parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
| download | linux-b5cd3b51e247473e290be5cd09e77171e466cd89.tar.gz linux-b5cd3b51e247473e290be5cd09e77171e466cd89.zip | |
Merge branch 'linus' into x86/platform, to refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/net/inet_sock.h')
| -rw-r--r-- | include/net/inet_sock.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index aa95053dfc78..db8162dd8c0b 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -96,7 +96,7 @@ struct inet_request_sock { kmemcheck_bitfield_end(flags); u32 ir_mark; union { - struct ip_options_rcu *opt; + struct ip_options_rcu __rcu *ireq_opt; #if IS_ENABLED(CONFIG_IPV6) struct { struct ipv6_txoptions *ipv6_opt; @@ -132,6 +132,12 @@ static inline int inet_request_bound_dev_if(const struct sock *sk, return sk->sk_bound_dev_if; } +static inline struct ip_options_rcu *ireq_opt_deref(const struct inet_request_sock *ireq) +{ + return rcu_dereference_check(ireq->ireq_opt, + refcount_read(&ireq->req.rsk_refcnt) > 0); +} + struct inet_cork { unsigned int flags; __be32 addr; |
