Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753785AbbDGV0P (ORCPT ); Tue, 7 Apr 2015 17:26:15 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:59773 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753104AbbDGV0M (ORCPT ); Tue, 7 Apr 2015 17:26:12 -0400 Date: Tue, 07 Apr 2015 17:26:07 -0400 (EDT) Message-Id: <20150407.172607.869971800253661690.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, agrover@redhat.com, clm@fb.com, zab@zabbo.net, ajaykumar.hotchandani@oracle.com, sergei.shtylyov@cogentembedded.com Subject: Re: [PATCH v4 3/3] RDS: make sure not to loop forever inside rds_send_xmit From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.6 on Emacs 24.4 / 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]); Tue, 07 Apr 2015 14:26:12 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 34 From: Sowmini Varadhan Date: Tue, 7 Apr 2015 16:38:04 -0400 > @@ -157,6 +160,17 @@ int rds_send_xmit(struct rds_connection *conn) > } > > /* > + * we record the send generation after doing the xmit acquire. > + * if someone else manages to jump in and do some work, we'll use > + * this to avoid a goto restart farther down. > + * > + * we don't need a lock because the counter is only incremented > + * while we have the in_xmit bit held. > + */ > + conn->c_send_gen++; > + send_gen = conn->c_send_gen; This increment does need to either be changed to be an atomic_t or covered by a lock. Otherwise two concurrent callers can both try to increment it at the same time, and it only effectively increments once. That's corrupted state and will break all of the new logic added here. Still very unhappy with this patch series submission, as I still find new problems every time I look at these changes. Are you evaluating them and double checking all of the claims in the commit log message and comments, and logic in these, or are you just passing them off upstream after testing and leaving the checking to people like me? -- 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/