Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759184AbcDJSyj (ORCPT ); Sun, 10 Apr 2016 14:54:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52814 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758905AbcDJSyB (ORCPT ); Sun, 10 Apr 2016 14:54:01 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jenny Derzhavetz , Sagi Grimberg , Nicholas Bellinger Subject: [PATCH 4.5 211/238] iser-target: Fix identification of login rx descriptor type Date: Sun, 10 Apr 2016 11:36:28 -0700 Message-Id: <20160410183507.713708445@linuxfoundation.org> X-Mailer: git-send-email 2.8.0 In-Reply-To: <20160410183456.398741366@linuxfoundation.org> References: <20160410183456.398741366@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: 1172 Lines: 35 4.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jenny Derzhavetz commit b89a7c25462b164db280abc3b05d4d9d888d40e9 upstream. Once connection request is accepted, one rx descriptor is posted to receive login request. This descriptor has rx type, but is outside the main pool of rx descriptors, and thus was mistreated as tx type. Signed-off-by: Jenny Derzhavetz Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/isert/ib_isert.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -2048,7 +2048,8 @@ is_isert_tx_desc(struct isert_conn *iser void *start = isert_conn->rx_descs; int len = ISERT_QP_MAX_RECV_DTOS * sizeof(*isert_conn->rx_descs); - if (wr_id >= start && wr_id < start + len) + if ((wr_id >= start && wr_id < start + len) || + (wr_id == isert_conn->login_req_buf)) return false; return true;