]> git.baikalelectronics.ru Git - kernel.git/commit
IB/cma: Fix ports memory leak in cma_configfs
authorMaor Gottlieb <maorg@mellanox.com>
Thu, 21 May 2020 07:26:50 +0000 (10:26 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 22 May 2020 18:37:19 +0000 (15:37 -0300)
commit129f17a40fa809ead21796b19d3d2f2305b30a1b
treea7e84e74dce147daff8a151793d58140c1ca3945
parent924b9cc1081e31b815e782aee723079abbb9f6dd
IB/cma: Fix ports memory leak in cma_configfs

The allocated ports structure in never freed. The free function should be
called by release_cma_ports_group, but the group is never released since
we don't remove its default group.

Remove default groups when device group is deleted.

Fixes: 54e6fc167fe8 ("IB/cma: Add configfs for rdma_cm")
Link: https://lore.kernel.org/r/20200521072650.567908-1-leon@kernel.org
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cma_configfs.c