From: Jenny Derzhavetz Date: Wed, 24 Feb 2016 17:23:58 +0000 (+0200) Subject: iser-target: Fix identification of login rx descriptor type X-Git-Tag: v4.1.12-92~150^2~51 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b8e49a57fdefb98478534f822d03d376e0de2c52;p=users%2Fjedix%2Flinux-maple.git iser-target: Fix identification of login rx descriptor type Orabug: 23331107 [ Upstream commit b89a7c25462b164db280abc3b05d4d9d888d40e9 ] 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 Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Nicholas Bellinger Signed-off-by: Sasha Levin (cherry picked from commit 3c6961458165c0ec909d68191bff4de7bdf50549) Signed-off-by: Dan Duval --- diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 353e2ab090ee..7b6973d754b4 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -2059,7 +2059,8 @@ is_isert_tx_desc(struct isert_conn *isert_conn, void *wr_id) 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;