linux/drivers/infiniband/core
Chenguang Zhao e939334ea7 RDMA/core: Fix memory leak in __ib_create_cq() on invalid cqe
Move the zero CQE validation before rdma_zalloc_drv_obj() to avoid
leaking the CQ object when returning -EINVAL.

Fixes: a291758288 ("RDMA/core: Reject zero CQE count")
Link: https://patch.msgid.link/r/20260625020148.224537-1-zhaochenguang@kylinos.cn
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2026-07-02 14:19:33 -03:00
..
addr.c RDMA/core: Fix broadcast address falsely detected as local 2026-06-10 14:45:43 -03:00
agent.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
agent.h
cache.c RDMA/core: Fix memory free for GID table 2026-04-07 11:42:34 -03:00
cgroup.c
cm_msgs.h
cm_trace.c
cm_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
cm.c IB/cm: Fix av cm device leak on an error path in cm_init_av_by_path() 2026-06-05 13:07:45 -03:00
cma_configfs.c RDMA/cma: Constify struct configfs_item_operations and configfs_group_operations 2026-05-18 04:58:42 -04:00
cma_priv.h RDMA/core: introduce rdma_restrict_node_type() 2026-02-08 17:12:58 -06:00
cma_trace.c
cma_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
cma.c RDMA/cma: Fix hardware address comparison length in netevent callback 2026-07-02 07:03:46 -04:00
core_priv.h RDMA/core: Don't make a dummy ib_udata on the stack in create_qp 2026-06-03 15:12:43 -03:00
counters.c RDMA/counter: Fix incorrect port index in rdma_counter_init() error cleanup 2026-05-25 12:40:08 -03:00
cq.c RDMA/core: Reject zero CQE count 2026-02-25 08:15:30 -05:00
device.c RDMA: Update the query_device() op 2026-06-03 15:12:43 -03:00
frmr_pools.c RDMA/core: Add ib_frmr_pool_drop for unrecoverable handles 2026-06-11 15:36:09 -03:00
frmr_pools.h RDMA/core: Add netlink command to modify FRMR aging 2026-03-02 13:45:37 -05:00
ib_core_uverbs.c RDMA/core: Don't make a dummy ib_udata on the stack in create_qp 2026-06-03 15:12:43 -03:00
iter.c RDMA/umem: Fix truncation for block sizes >= 4G 2026-06-03 09:37:34 -03:00
iwcm.c RDMA/iwcm: User strscpy() to copy device name 2026-06-09 14:57:37 -03:00
iwcm.h RDMA/iwcm: Fix workqueue list corruption by removing work_list 2026-01-15 04:59:53 -05:00
iwpm_msg.c RDMA/core: Prefer NLA_NUL_STRING 2026-04-09 10:58:56 -03:00
iwpm_util.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
iwpm_util.h
lag.c RDMA/core: Remove NULL check before dev_{put, hold} 2024-05-05 15:12:35 +03:00
mad_priv.h IB/mad: Add flow control for solicited MADs 2025-07-09 02:51:30 -04:00
mad_rmpp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mad_rmpp.h
mad.c IB/mad: Drop unmatched RMPP responses before reassembly 2026-06-29 08:08:59 -04:00
Makefile RDMA/core: Move flow related functions to ib_uverbs_support.ko 2026-05-26 10:11:43 -03:00
mr_pool.c
multicast.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
netlink.c RDMA/nldev: Add support for RDMA monitoring 2024-09-13 08:29:14 +03:00
nldev.c RDMA/nldev: Fix locking when accessing mr->pd 2026-06-08 14:32:43 -03:00
opa_smi.h
packer.c
rdma_core.c RDMA/core: Make a new module for the uverbs components needed by drivers 2026-05-26 10:09:37 -03:00
rdma_core.h RDMA/core: Don't make a dummy ib_udata on the stack in create_qp 2026-06-03 15:12:43 -03:00
restrack.c RDMA/nldev: Fix locking when accessing mr->pd 2026-06-08 14:32:43 -03:00
restrack.h RDMA/nldev: Fix locking when accessing mr->pd 2026-06-08 14:32:43 -03:00
roce_gid_mgmt.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
rw.c RDMA/rw: Fix MR pool exhaustion in bvec RDMA READ path 2026-03-17 15:00:56 -04:00
sa_query.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sa.h
security.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
smi.c
smi.h
sysfs.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
trace.c
ucaps.c RDMA v7.2 merge window 2026-06-18 08:16:21 -07:00
ucma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ud_header.c RDMA/core: Remove unused ib_ud_header_unpack 2024-12-24 05:00:42 -05:00
umem_dmabuf.c RDMA v7.1 merge window 2026-04-20 11:20:35 -07:00
umem_odp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
umem.c RDMA v7.2 merge window 2026-06-18 08:16:21 -07:00
user_mad.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
uverbs_cmd.c RDMA/nldev: Fix locking when accessing mr->pd 2026-06-08 14:32:43 -03:00
uverbs_flow.c RDMA/core: Move flow related functions to ib_uverbs_support.ko 2026-05-26 10:11:43 -03:00
uverbs_ioctl.c RDMA/core: Move many of the little EXPORTs from uverbs_ioctl into ib_core_uverbs 2026-05-26 10:07:26 -03:00
uverbs_main.c RDMA/core: Move ucaps into ib_uverbs_support.ko 2026-05-26 10:11:43 -03:00
uverbs_marshall.c RDMA/core: Remove unused ib_copy_path_rec_from_user 2024-12-24 05:00:42 -05:00
uverbs_std_types_async_fd.c RDMA/core: Remove uverbs_async_event_release() 2026-05-26 10:09:37 -03:00
uverbs_std_types_counters.c
uverbs_std_types_cq.c RDMA/uverbs: Remove legacy umem field from struct ib_cq 2026-05-29 20:19:59 -03:00
uverbs_std_types_device.c RDMA: Add IB_UVERBS_CORE_SUPPORT_ROBUST_UDATA 2026-03-08 06:20:25 -04:00
uverbs_std_types_dm.c
uverbs_std_types_dmabuf.c drm-misc-next for v7.1: 2026-03-02 16:58:07 +10:00
uverbs_std_types_dmah.c RDMA/core: Validate cpu_id against nr_cpu_ids in DMAH alloc 2026-06-03 14:55:48 -03:00
uverbs_std_types_flow_action.c
uverbs_std_types_mr.c IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
uverbs_std_types_qp.c RDMA/core: Don't make a dummy ib_udata on the stack in create_qp 2026-06-03 15:12:43 -03:00
uverbs_std_types_srq.c
uverbs_std_types_wq.c
uverbs_std_types.c RDMA/core: Move many of the little EXPORTs from uverbs_ioctl into ib_core_uverbs 2026-05-26 10:07:26 -03:00
uverbs_uapi.c RDMA/core: Remove uverbs_async_event_release() 2026-05-26 10:09:37 -03:00
uverbs.h RDMA/core: Make a new module for the uverbs components needed by drivers 2026-05-26 10:09:37 -03:00
verbs.c RDMA/core: Fix memory leak in __ib_create_cq() on invalid cqe 2026-07-02 14:19:33 -03:00