aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_timewait_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_timewait_sock.h')
-rw-r--r--include/net/inet_timewait_sock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 79f67eae8a7e..a066fdd50da6 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -224,7 +224,9 @@ static inline
224struct net *twsk_net(const struct inet_timewait_sock *twsk) 224struct net *twsk_net(const struct inet_timewait_sock *twsk)
225{ 225{
226#ifdef CONFIG_NET_NS 226#ifdef CONFIG_NET_NS
227 return rcu_dereference(twsk->tw_net); 227 return rcu_dereference_raw(twsk->tw_net); /* protected by locking, */
228 /* reference counting, */
229 /* initialization, or RCU. */
228#else 230#else
229 return &init_net; 231 return &init_net;
230#endif 232#endif