diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-02-29 09:04:01 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-02-29 09:04:01 +0100 |
commit | 0a7348925f58839fbb4c86b7e34f43b91beb0586 (patch) | |
tree | 8db1b38503cc444f78b13ed1a3d6816708cf181c /net/ipv6/tcp_ipv6.c | |
parent | ce1984cc45ccf943f1b78b1674dfdbe5df2d45a9 (diff) | |
parent | fc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff) | |
download | linux-0a7348925f58839fbb4c86b7e34f43b91beb0586.tar.gz linux-0a7348925f58839fbb4c86b7e34f43b91beb0586.tar.bz2 linux-0a7348925f58839fbb4c86b7e34f43b91beb0586.zip |
Merge tag 'v4.5-rc6' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 1a5a70fb8551..5c8c84273028 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1387,7 +1387,7 @@ process: if (sk->sk_state == TCP_NEW_SYN_RECV) { struct request_sock *req = inet_reqsk(sk); - struct sock *nsk = NULL; + struct sock *nsk; sk = req->rsk_listener; tcp_v6_fill_cb(skb, hdr, th); @@ -1395,24 +1395,24 @@ process: reqsk_put(req); goto discard_it; } - if (likely(sk->sk_state == TCP_LISTEN)) { - nsk = tcp_check_req(sk, skb, req, false); - } else { + if (unlikely(sk->sk_state != TCP_LISTEN)) { inet_csk_reqsk_queue_drop_and_put(sk, req); goto lookup; } + sock_hold(sk); + nsk = tcp_check_req(sk, skb, req, false); if (!nsk) { reqsk_put(req); - goto discard_it; + goto discard_and_relse; } if (nsk == sk) { - sock_hold(sk); reqsk_put(req); tcp_v6_restore_cb(skb); } else if (tcp_child_process(sk, nsk, skb)) { tcp_v6_send_reset(nsk, skb); - goto discard_it; + goto discard_and_relse; } else { + sock_put(sk); return 0; } } |