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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 773b10fa38e4..4fd007f34dd5 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -212,14 +212,14 @@ extern void inet_twsk_schedule(struct inet_timewait_sock *tw,
212extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, 212extern void inet_twsk_deschedule(struct inet_timewait_sock *tw,
213 struct inet_timewait_death_row *twdr); 213 struct inet_timewait_death_row *twdr);
214 214
215extern void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo, 215extern void inet_twsk_purge(struct inet_hashinfo *hashinfo,
216 struct inet_timewait_death_row *twdr, int family); 216 struct inet_timewait_death_row *twdr, int family);
217 217
218static inline 218static inline
219struct net *twsk_net(const struct inet_timewait_sock *twsk) 219struct net *twsk_net(const struct inet_timewait_sock *twsk)
220{ 220{
221#ifdef CONFIG_NET_NS 221#ifdef CONFIG_NET_NS
222 return twsk->tw_net; 222 return rcu_dereference(twsk->tw_net);
223#else 223#else
224 return &init_net; 224 return &init_net;
225#endif 225#endif
@@ -229,7 +229,7 @@ static inline
229void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net) 229void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net)
230{ 230{
231#ifdef CONFIG_NET_NS 231#ifdef CONFIG_NET_NS
232 twsk->tw_net = net; 232 rcu_assign_pointer(twsk->tw_net, net);
233#endif 233#endif
234} 234}
235#endif /* _INET_TIMEWAIT_SOCK_ */ 235#endif /* _INET_TIMEWAIT_SOCK_ */