Skip to content

Commit 93acb7b

Browse files
Sagi Grimbergrolandd
authored andcommitted
IB/iser: Decrement CQ's active QPs accounting when QP creation fails
When creating a connection QP we choose the least used CQ and inc the number of active QPs on that. If we fail to create the QP, we need to decrement the active QPs counter. Reported-by: Roi Dayan <roid@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>
1 parent 5426b17 commit 93acb7b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/infiniband/ulp/iser/iser_verbs.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,11 @@ static int iser_create_ib_conn_res(struct ib_conn *ib_conn)
494494
return ret;
495495

496496
out_err:
497+
mutex_lock(&ig.connlist_mutex);
498+
ib_conn->comp->active_qps--;
499+
mutex_unlock(&ig.connlist_mutex);
497500
iser_err("unable to alloc mem or create resource, err %d\n", ret);
501+
498502
return ret;
499503
}
500504

0 commit comments

Comments
 (0)