瀏覽代碼

IB/iser: Fix catastrophic error flow hang

In case of the HCA going into catasrophic error flow, the
beacon post_send is likely to fail, so surely there will
be no completion for it.

In this case, use a best effort approach and don't wait for beacon
completion if we failed to post the send.

Reported-by: Alex Tabachnik <alext@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Sagi Grimberg 10 年之前
父節點
當前提交
16df2a26fb
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/infiniband/ulp/iser/iser_verbs.c

+ 3 - 1
drivers/infiniband/ulp/iser/iser_verbs.c

@@ -681,8 +681,10 @@ int iser_conn_terminate(struct iser_conn *iser_conn)
 
 
 		/* post an indication that all flush errors were consumed */
 		/* post an indication that all flush errors were consumed */
 		err = ib_post_send(ib_conn->qp, &ib_conn->beacon, &bad_wr);
 		err = ib_post_send(ib_conn->qp, &ib_conn->beacon, &bad_wr);
-		if (err)
+		if (err) {
 			iser_err("conn %p failed to post beacon", ib_conn);
 			iser_err("conn %p failed to post beacon", ib_conn);
+			return 1;
+		}
 
 
 		wait_for_completion(&ib_conn->flush_comp);
 		wait_for_completion(&ib_conn->flush_comp);
 	}
 	}