From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] rds: MP-RDS may use an invalid c_path Date: Wed, 11 Apr 2018 10:24:28 -0400 (EDT) Message-ID: <20180411.102428.2000222108532218799.davem@davemloft.net> References: <1523433445-7596-1-git-send-email-ka-cheong.poon@oracle.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, santosh.shilimkar@oracle.com, rds-devel@oss.oracle.com To: ka-cheong.poon@oracle.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:41154 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751491AbeDKOYa (ORCPT ); Wed, 11 Apr 2018 10:24:30 -0400 In-Reply-To: <1523433445-7596-1-git-send-email-ka-cheong.poon@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Ka-Cheong Poon Date: Wed, 11 Apr 2018 00:57:25 -0700 > rds_sendmsg() calls rds_send_mprds_hash() to find a c_path to use to > send a message. Suppose the RDS connection is not yet up. In > rds_send_mprds_hash(), it does > > if (conn->c_npaths == 0) > wait_event_interruptible(conn->c_hs_waitq, > (conn->c_npaths != 0)); > > If it is interrupted before the connection is set up, > rds_send_mprds_hash() will return a non-zero hash value. Hence > rds_sendmsg() will use a non-zero c_path to send the message. But if > the RDS connection ends up to be non-MP capable, the message will be > lost as only the zero c_path can be used. > > Signed-off-by: Ka-Cheong Poon Applied and queued up for -stable, thanks.