]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/rtrs-clt: Start hb after path_up
authorJack Wang <jinpu.wang@ionos.com>
Mon, 20 Nov 2023 15:41:39 +0000 (16:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:36:39 +0000 (18:36 +0100)
[ Upstream commit 3e44a61b5db873612e20e7b7922468d7d1ac2d22 ]

If we start hb too early, it will confuse server side to close
the session.

Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Reviewed-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com>
Link: https://lore.kernel.org/r/20231120154146.920486-3-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-clt.c

index afe8670f9e555d59665eb3823d969df55b4040a8..fac5e122fd372fd5684dda2af305927dabd09bd0 100644 (file)
@@ -2341,8 +2341,6 @@ static int init_conns(struct rtrs_clt_path *clt_path)
        if (err)
                goto destroy;
 
-       rtrs_start_hb(&clt_path->s);
-
        return 0;
 
 destroy:
@@ -2616,6 +2614,7 @@ static int init_path(struct rtrs_clt_path *clt_path)
                goto out;
        }
        rtrs_clt_path_up(clt_path);
+       rtrs_start_hb(&clt_path->s);
 out:
        mutex_unlock(&clt_path->init_mutex);