浏览代码

IB/iser: Fix unload during ep_poll wrong dereference

In case the user unloaded ib_iser while ep_connect is in
progress, we need to destroy the endpoint although ep_disconnect
wasn't invoked (we detect this by the iser conn state != DOWN).
However, if we got an REJECTED/UNREACHABLE CM event we move the
connection state to DOWN which will prevent us from destroying
the endpoint in the module unload stage. Fix this by setting the
connection state to TERMINATING in iser_conn_error so we can still
destroy the endpoint at unload stage.

Reported-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Sagi Grimberg 10 年之前
父节点
当前提交
c4de4663e0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/infiniband/ulp/iser/iser_verbs.c

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

@@ -721,7 +721,7 @@ static void iser_connect_error(struct rdma_cm_id *cma_id)
 	struct iser_conn *iser_conn;
 	struct iser_conn *iser_conn;
 
 
 	iser_conn = (struct iser_conn *)cma_id->context;
 	iser_conn = (struct iser_conn *)cma_id->context;
-	iser_conn->state = ISER_CONN_DOWN;
+	iser_conn->state = ISER_CONN_TERMINATING;
 }
 }
 
 
 /**
 /**