tmp_suning_uos_patched/drivers/infiniband
Miaoqian Lin b0cab8b517 RDMA/cm: Fix memory leak in ib_cm_insert_listen
commit 2990f223ffa7bb25422956b9f79f9176a5b38346 upstream.

cm_alloc_id_priv() allocates resource for the cm_id_priv. When
cm_init_listen() fails it doesn't free it, leading to memory leak.

Add the missing error unwind.

Fixes: 98f67156a8 ("RDMA/cm: Simplify establishing a listen cm_id")
Link: https://lore.kernel.org/r/20220621052546.4821-1-linmq006@gmail.com
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-07 17:52:17 +02:00
..
core RDMA/cm: Fix memory leak in ib_cm_insert_listen 2022-07-07 17:52:17 +02:00
hw RDMA/qedr: Fix reporting QP timeout attribute 2022-07-07 17:52:17 +02:00
sw RDMA/rxe: Generate a completion for unsupported/invalid opcode 2022-06-09 10:21:31 +02:00
ulp scsi: iscsi: Rel ref after iscsi_lookup_endpoint() 2022-04-20 09:23:16 +02:00
Kconfig RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs 2020-11-12 13:27:41 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00