From patchwork Mon Mar 27 07:06:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yanjun X-Patchwork-Id: 9645393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96D8160328 for ; Mon, 27 Mar 2017 07:07:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88F8328334 for ; Mon, 27 Mar 2017 07:07:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D5B92835B; Mon, 27 Mar 2017 07:07:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18B8228334 for ; Mon, 27 Mar 2017 07:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452AbdC0HHH (ORCPT ); Mon, 27 Mar 2017 03:07:07 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:22558 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020AbdC0HHE (ORCPT ); Mon, 27 Mar 2017 03:07:04 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v2R76he2019447 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Mar 2017 07:06:44 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v2R76gwo020343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 Mar 2017 07:06:42 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v2R76fvs003004; Mon, 27 Mar 2017 07:06:42 GMT Received: from redman.cn.oracle.com (/10.113.194.127) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 27 Mar 2017 00:06:41 -0700 From: Zhu Yanjun To: yanjun.zhu@oracle.com, santosh.shilimkar@oracle.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, junxiao.bi@oracle.com, joe.jin@oracle.com Subject: [PATCH 1/5] rds: tcp: release the created connection Date: Mon, 27 Mar 2017 03:06:26 -0400 Message-Id: <1490598390-13812-2-git-send-email-yanjun.zhu@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490598390-13812-1-git-send-email-yanjun.zhu@oracle.com> References: <1490598390-13812-1-git-send-email-yanjun.zhu@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When some error occurs, the created connection should be destroyed. Signed-off-by: Zhu Yanjun --- net/rds/tcp_listen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c index 5076788..58aa5bc 100644 --- a/net/rds/tcp_listen.c +++ b/net/rds/tcp_listen.c @@ -196,6 +196,7 @@ int rds_tcp_accept_one(struct socket *sock) rst_nsk: /* reset the newly returned accept sock and bail */ kernel_sock_shutdown(new_sock, SHUT_RDWR); + rds_conn_destroy(conn); ret = 0; out: if (rs_tcp)