Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbbEDSr3 (ORCPT ); Mon, 4 May 2015 14:47:29 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:37973 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbbEDSrX (ORCPT ); Mon, 4 May 2015 14:47:23 -0400 Date: Mon, 04 May 2015 14:47:20 -0400 (EDT) Message-Id: <20150504.144720.2228274897975931117.davem@davemloft.net> To: sowmini.varadhan@oracle.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, chien.yen@oracle.com, rds-devel@oss.oracle.com, ajaykumar.hotchandani@oracle.com Subject: Re: [PATCH 1/2] net/rds: RDS-TCP: Always create a new rds_sock for an incoming connection. From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 04 May 2015 11:47:22 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1437 Lines: 30 From: Sowmini Varadhan Date: Sat, 2 May 2015 07:55:08 -0400 > When running RDS over TCP, the active (client) side connects to the > listening ("passive") side at the RDS_TCP_PORT. After the connection > is established, if the client side reboots (potentially without even > sending a FIN) the server still has a TCP socket in the Established > state. If the server-side now gets a new SYN comes from the client > with a different client port, TCP will create a new socket-pair, but > the RDS layer will incorrectly pull up the old rds_connection (which > is still associated with the stale t_sock and RDS socket state). > > This patch corrects this behavior by having rds_tcp_accept_one() > always create a new connection for an incoming TCP SYN. > The rds and tcp state associated with the old socket-pair is cleaned > up in rds_tcp_set_callbacks() (i.e., rds_conn_drop on the old > connection) > > Signed-off-by: Sowmini Varadhan I think adding 64K of data to this module just to solve this rare issue is excessive. Furthermore I don't see any locking protecting the hash table nor the RDS socket linkage into that table. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/