diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2021-06-29 08:49:33 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-06-30 00:57:18 +0200 |
commit | 3d8287544223a3d2f37981c1f9ffd94d0b5e9ffc (patch) | |
tree | 522fe43b4f90766560f9e7ec0cba147de84c46a3 /include/uapi | |
parent | RDMA/mlx5: Don't access NULL-cleared mpi pointer (diff) | |
download | linux-3d8287544223a3d2f37981c1f9ffd94d0b5e9ffc.tar.xz linux-3d8287544223a3d2f37981c1f9ffd94d0b5e9ffc.zip |
RDMA/core: Always release restrack object
Change location of rdma_restrack_del() to fix the bug where
task_struct was acquired but not released, causing to resource leak.
ucma_create_id() {
ucma_alloc_ctx();
rdma_create_user_id() {
rdma_restrack_new();
rdma_restrack_set_name() {
rdma_restrack_attach_task.part.0(); <--- task_struct was gotten
}
}
ucma_destroy_private_ctx() {
ucma_put_ctx();
rdma_destroy_id() {
_destroy_id() <--- id_priv was freed
}
}
}
Fixes: 889d916b6f8a ("RDMA/core: Don't access cm_id after its destruction")
Link: https://lore.kernel.org/r/073ec27acb943ca8b6961663c47c5abe78a5c8cc.1624948948.git.leonro@nvidia.com
Reported-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions