iser-target: Fix possible use-after-free in connection establishment error

In case we fail to establish the connection we must drain our pre-posted
login recieve work request before continuing safely with connection
teardown.

Fixes: a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API")
Cc: <stable@vger.kernel.org> # 4.7+
Reported-by: Amrani, Ram <Ram.Amrani@cavium.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by Sagi Grimberg and committed by Doug Ledford cd52cb26 a1ffa467

+1
+1
drivers/infiniband/ulp/isert/ib_isert.c
··· 741 741 { 742 742 struct isert_conn *isert_conn = cma_id->qp->qp_context; 743 743 744 + ib_drain_qp(isert_conn->qp); 744 745 list_del_init(&isert_conn->node); 745 746 isert_conn->cm_id = NULL; 746 747 isert_put_conn(isert_conn);