RDMA/rtrs-srv: Check return values while processing info request
authorMd Haris Iqbal <haris.iqbal@ionos.com>
Mon, 20 Nov 2023 15:41:40 +0000 (16:41 +0100)
committerLeon Romanovsky <leon@kernel.org>
Wed, 22 Nov 2023 11:40:55 +0000 (13:40 +0200)
commited1e52aefa16f15dc2f04054a3baf11726a7460e
treee7006ceb476741171ba3778fde16196b8f5a32a5
parent3e44a61b5db873612e20e7b7922468d7d1ac2d22
RDMA/rtrs-srv: Check return values while processing info request

While processing info request, it could so happen that the srv_path goes
to CLOSING state, cause of any of the error events from RDMA. That state
change should be picked up while trying to change the state in
process_info_req, by checking the return value. In case the state change
call in process_info_req fails, we fail the processing.

We should also check the return value for rtrs_srv_path_up, since it
sends a link event to the client above, and the client can fail for any
reason.

Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality")
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com>
Link: https://lore.kernel.org/r/20231120154146.920486-4-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-srv.c