Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9131877pxu; Mon, 28 Dec 2020 07:24:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxX7lD7s/0MiZuMPUX3GN1lEsEIrcrvzqXG6WSut1E6c6g5Btcgp6VB03GcscdVMftXkz4i X-Received: by 2002:a05:6402:1045:: with SMTP id e5mr43011277edu.40.1609169066829; Mon, 28 Dec 2020 07:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609169066; cv=none; d=google.com; s=arc-20160816; b=d/HEszACMh1XQSeUQhd2c/NE8U4PIwrKT1l0NCYGnXT09yJbGNvNeyGjZJQK5MeIe5 3wDZba8gYBuK2pXDkRtilQnY2ZCKToeAtXBrGZ4Jn+3ubKyzioP2IdfHcPGLbr3HaM5K 0OuYSA3OT+FhzWzJqScNMFJyCN31Q02JI0DrvVLhqC28VokiHDsa+FdodRwwvX3wPrlj PiAA6jjE0aBv5zXF9aUNEBToDKJwiZixj5Q9f5utNtsg/UFF0MpsLsNRVx3kmhC9z2Nz l/h3hm7Nnao3PyY1xESccWJG+CxI6Ae16Ou2+BtmKNTXbrJ2N2lMoFQUu/NgBr2Ul/hl tiig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gfdNnCaHlr3eeLQyWnJoX56PUyuVyonjys8E6go2wj0=; b=aW7Ax8hK2CpxYPoAA3AoEGqCz3+oU6lVgQu+ntrwf3JAnmjOD6iHhmzzjA7ZPRVb1p NVH1KZFAvYnEJcV0PfZOBjnd3qs6ljZHzEAk8VrWmKjTzvNLh9Thg5Si7ogjG2WFrSwN 9STnMnyidUc8xMJ30HgNGcnruicCL5Hhxw9cxyWeJG6nG/zASh6GYrLoGn1maGChBGD7 kswYRI8/twact7TYgj10yltqxUuy5r0mv0xLDvwku9xmcfJeC+jiwbHKDlOLV1Tt1AbH SlgLHZPJgmM80Zcb7yAEuUL+EBB60RjWc0ADqeP5v0hiH3EEJRxNx6tecYtxAtK817uW iYKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=safueGgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb16si18175592ejb.392.2020.12.28.07.24.02; Mon, 28 Dec 2020 07:24:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=safueGgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407953AbgL1OAY (ORCPT + 99 others); Mon, 28 Dec 2020 09:00:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:33656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407933AbgL1OAT (ORCPT ); Mon, 28 Dec 2020 09:00:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31CEA20715; Mon, 28 Dec 2020 14:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164003; bh=7vI0Q7x/w8du7L5B9lNnZXh9mvBXTj8LZPNDxI5uM50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=safueGgGy1J9UkHsm90QiNCFm1bH1HP1YUICyXCHRyfS+y/fXDOOUpgUwRcMCJn1q ENbjYvxZRROh/ay0q2nNdbZijmnh5tDnxW8vc41Anl4vNvAl3Gm7vpIwnXQmJzxSnx ll0EgZPHt1LPfOu09/Nap6ZF3FuCm95lKwG/nG40= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gioh Kim , Jack Wang , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 027/717] RDMA/rtrs-clt: Missing error from rtrs_rdma_conn_established Date: Mon, 28 Dec 2020 13:40:25 +0100 Message-Id: <20201228125022.287534526@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gioh Kim [ Upstream commit f553e7601df9566ba7644541fc09152a3a81f793 ] When rtrs_rdma_conn_established returns error (non-zero value), the error value is stored in con->cm_err and it cannot trigger rtrs_rdma_error_recovery. Finally the error of rtrs_rdma_con_established will be forgot. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20201023074353.21946-5-jinpu.wang@cloud.ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index 3cc957fea93ee..d54a77ebe1184 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -1835,8 +1835,8 @@ static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id, cm_err = rtrs_rdma_route_resolved(con); break; case RDMA_CM_EVENT_ESTABLISHED: - con->cm_err = rtrs_rdma_conn_established(con, ev); - if (likely(!con->cm_err)) { + cm_err = rtrs_rdma_conn_established(con, ev); + if (likely(!cm_err)) { /* * Report success and wake up. Here we abuse state_wq, * i.e. wake up without state change, but we set cm_err. -- 2.27.0