Skip to content

Commit

Permalink
RDMA/ucma: Fix struct ucma_event leak when backlog is full
Browse files Browse the repository at this point in the history
We discard new connection requests while the listen backlog is full,
but leak a struct ucma_event in the process.  Free the structure in
this case.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Sean Hefty authored and Roland Dreier committed Jan 8, 2007
1 parent 881a045 commit 30a5ec9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/core/ucma.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id,
if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST) {
if (!ctx->backlog) {
ret = -EDQUOT;
kfree(uevent);
goto out;
}
ctx->backlog--;
Expand Down

0 comments on commit 30a5ec9

Please sign in to comment.