aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-10-14 14:16:26 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-16 03:52:17 -0400
commitef84d8ce5a36d0c4a6454e7e9dff54d19f96a25f (patch)
tree30057b306c266194b6e920d1010ce70c8ae4ecf1 /net/ipv4/tcp_ipv4.c
parent47ea0325337b166c1c8695119aa6e83cdc035ef5 (diff)
Revert "inet: fix double request socket freeing"
This reverts commit c69736696cf3742b37d850289dc0d7ead177bb14. At the time of above commit, tcp_req_err() and dccp_req_err() were dead code, as SYN_RECV request sockets were not yet in ehash table. Real bug was fixed later in a different commit. We need to revert to not leak a refcount on request socket. inet_csk_reqsk_queue_drop_and_put() will be added in following commit to make clean inet_csk_reqsk_queue_drop() does not release the reference owned by caller. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 1ff0923df715..aad2298de7ad 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -324,7 +324,6 @@ void tcp_req_err(struct sock *sk, u32 seq)
324 324
325 if (seq != tcp_rsk(req)->snt_isn) { 325 if (seq != tcp_rsk(req)->snt_isn) {
326 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); 326 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
327 reqsk_put(req);
328 } else { 327 } else {
329 /* 328 /*
330 * Still in SYN_RECV, just remove it silently. 329 * Still in SYN_RECV, just remove it silently.
@@ -332,9 +331,10 @@ void tcp_req_err(struct sock *sk, u32 seq)
332 * created socket, and POSIX does not want network 331 * created socket, and POSIX does not want network
333 * errors returned from accept(). 332 * errors returned from accept().
334 */ 333 */
335 NET_INC_STATS_BH(net, LINUX_MIB_LISTENDROPS);
336 inet_csk_reqsk_queue_drop(req->rsk_listener, req); 334 inet_csk_reqsk_queue_drop(req->rsk_listener, req);
335 NET_INC_STATS_BH(net, LINUX_MIB_LISTENDROPS);
337 } 336 }
337 reqsk_put(req);
338} 338}
339EXPORT_SYMBOL(tcp_req_err); 339EXPORT_SYMBOL(tcp_req_err);
340 340