Skip to content

Commit

Permalink
IB/rxe: Fix a memory leak in rxe_qp_cleanup()
Browse files Browse the repository at this point in the history
A socket is associated with every QP by the rxe driver but sock_release()
is never called. Add a call to sock_release() in rxe_qp_cleanup().

Fixes: commit 8700e3e7c48A5 ("Add Soft RoCE driver")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Moni Shoua <monis@mellanox.com>
Cc: Kamal Heib <kamalh@mellanox.com>
Cc: Amir Vadai <amirv@mellanox.com>
Cc: Haggai Eran <haggaie@mellanox.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Bart Van Assche authored and Doug Ledford committed Dec 18, 2016
1 parent b414fa0 commit e259934
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/sw/rxe/rxe_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,4 +853,5 @@ void rxe_qp_cleanup(void *arg)
free_rd_atomic_resources(qp);

kernel_sock_shutdown(qp->sk, SHUT_RDWR);
sock_release(qp->sk);
}

0 comments on commit e259934

Please sign in to comment.