Re: [PATCH 1/5] rds: tcp: release the created connection

2 messages, 2 authors, 2017-03-27 · open the first message on its own page

Re: [PATCH 1/5] rds: tcp: release the created connection

From: Yanjun Zhu <hidden>
Date: 2017-03-27 08:05:45


On 2017/3/27 15:37, Sowmini Varadhan wrote:
On (03/27/17 03:06), Zhu Yanjun wrote:
quoted
Date: Mon, 27 Mar 2017 03:06:26 -0400
From: Zhu Yanjun <redacted>
To: yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
  netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
  rds-devel-N0ozoZBvEnrZJqsBc5GL+g@public.gmane.org, junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, joe.jin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: [PATCH 1/5] rds: tcp: release the created connection
X-Mailer: git-send-email 2.7.4

When some error occurs, the created connection should be destroyed.
No please dont do this.

This is the case when there are duelling connections. We want
to reset the new (accept sock) and leave the old socket in place.

How did you test this? Did you test it with network namespaces?
Sorry. I just made simple test. It seems that it worked well. Would you 
like to show me some test about this patch?

Thanks a lot.
Zhu Yanjun
--Sowmini

quoted
  net/rds/tcp_listen.c | 1 +
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)
-- 
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/5] rds: tcp: release the created connection

From: Sowmini Varadhan <hidden>
Date: 2017-03-27 09:18:12

On (03/27/17 16:05), Yanjun Zhu wrote:
Sorry. I just made simple test. It seems that it worked well. Would you like
to show me some test about this patch?
Your patch is a non-trivial bug. Dont do this.

Please read the comments above the "goto rst_nsk" in that function.
Also note the comments above rds_conn_destroy.

Thanks
--Sowmini
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help