tcp/dccp: remove obsolete WARN_ON() in icmp handlers
authorEric Dumazet <edumazet@google.com>
Thu, 17 Mar 2016 05:52:15 +0000 (22:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Mar 2016 01:06:40 +0000 (21:06 -0400)
Now SYN_RECV request sockets are installed in ehash table, an ICMP
handler can find a request socket while another cpu handles an incoming
packet transforming this SYN_RECV request socket into an ESTABLISHED
socket.

We need to remove the now obsolete WARN_ON(req->sk), since req->sk
is set when a new child is created and added into listener accept queue.

If this race happens, the ICMP will do nothing special.

Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Lazarus <blazarus@google.com>
Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv4.c
net/ipv4/tcp_ipv4.c

index b5672e5fe64966f89454357586bbccd797c97b94..9c67a961ba5382c8e3bf8c8a783224fd72b2c122 100644 (file)
@@ -204,8 +204,6 @@ void dccp_req_err(struct sock *sk, u64 seq)
         * ICMPs are not backlogged, hence we cannot get an established
         * socket here.
         */
-       WARN_ON(req->sk);
-
        if (!between48(seq, dccp_rsk(req)->dreq_iss, dccp_rsk(req)->dreq_gss)) {
                NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
        } else {
index 0b02ef77370572c1c1f0646c7231a208f5bb654e..e7528b101e680db7f980c05033133f10c1679a04 100644 (file)
@@ -319,8 +319,6 @@ void tcp_req_err(struct sock *sk, u32 seq, bool abort)
        /* ICMPs are not backlogged, hence we cannot get
         * an established socket here.
         */
-       WARN_ON(req->sk);
-
        if (seq != tcp_rsk(req)->snt_isn) {
                NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
        } else if (abort) {
This page took 0.039106 seconds and 5 git commands to generate.