Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933268AbbGSTXb (ORCPT ); Sun, 19 Jul 2015 15:23:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38793 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932758AbbGSTSf (ORCPT ); Sun, 19 Jul 2015 15:18:35 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bart Van Assche , Sagi Grimberg , Sebastian Parschauer , Doug Ledford Subject: [PATCH 4.0 46/58] IB/srp: Fix a connection setup race Date: Sun, 19 Jul 2015 12:11:24 -0700 Message-Id: <20150719190812.787842998@linuxfoundation.org> X-Mailer: git-send-email 2.4.6 In-Reply-To: <20150719190811.308546345@linuxfoundation.org> References: <20150719190811.308546345@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1521 Lines: 49 4.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bart Van Assche commit 8de9fe3a1d4ac8c3e4953fa4b7d81f863f5196ad upstream. Avoid that receiving a DREQ while RDMA channels are being established causes target->qp_in_error to be reset. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/srp/ib_srp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -992,8 +992,6 @@ static int srp_connect_ch(struct srp_rdm WARN_ON_ONCE(!multich && target->connected); - target->qp_in_error = false; - ret = srp_lookup_path(ch); if (ret) return ret; @@ -1242,6 +1240,9 @@ static int srp_rport_reconnect(struct sr for (j = 0; j < target->queue_size; ++j) list_add(&ch->tx_ring[j]->list, &ch->free_tx); } + + target->qp_in_error = false; + for (i = 0; i < target->ch_count; i++) { ch = &target->ch[i]; if (ret || !ch->target) { -- 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/