···329329 TCPF_NEW_SYN_RECV))330330 continue;331331332332- if (refcount_read(&sock_net(sk)->ns.count))332332+ if (check_net(sock_net(sk)))333333 continue;334334335335 if (unlikely(!refcount_inc_not_zero(&sk->sk_refcnt)))336336 continue;337337338338- if (refcount_read(&sock_net(sk)->ns.count)) {338338+ if (check_net(sock_net(sk))) {339339 sock_gen_put(sk);340340 goto restart;341341 }
+1-1
net/ipv4/tcp_metrics.c
···912912 spin_lock_bh(&tcp_metrics_lock);913913 for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) {914914 match = net ? net_eq(tm_net(tm), net) :915915- !refcount_read(&tm_net(tm)->ns.count);915915+ !check_net(tm_net(tm));916916 if (match) {917917 rcu_assign_pointer(*pp, tm->tcpm_next);918918 kfree_rcu(tm, rcu_head);