subflow: use rsk_ops->send_reset()
authorPaolo Abeni <pabeni@redhat.com>
Thu, 23 Jul 2020 11:02:35 +0000 (13:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Jul 2020 18:47:25 +0000 (11:47 -0700)
tcp_send_active_reset() is more prone to transient errors
(memory allocation or xmit queue full): in stress conditions
the kernel may drop the egress packet, and the client will be
stuck.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Tested-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c

index 3ef445f..ada04df 100644 (file)
@@ -524,9 +524,9 @@ out:
 dispose_child:
        subflow_drop_ctx(child);
        tcp_rsk(req)->drop_req = true;
-       tcp_send_active_reset(child, GFP_ATOMIC);
        inet_csk_prepare_for_destroy_sock(child);
        tcp_done(child);
+       req->rsk_ops->send_reset(sk, skb);
 
        /* The last child reference will be released by the caller */
        return child;