linux/drivers/infiniband/core
Shuhao Fu d8713158fa RDMA/uverbs: Fix umem release in UVERBS_METHOD_CQ_CREATE
In `UVERBS_METHOD_CQ_CREATE`, umem should be released if anything goes
wrong. Currently, if `create_cq_umem` fails, umem would not be
released or referenced, causing a possible leak.

In this patch, we release umem at `UVERBS_METHOD_CQ_CREATE`, the driver
should not release umem if it returns an error code.

Fixes: 1a40c362ae ("RDMA/uverbs: Add a common way to create CQ with umem")
Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
Link: https://patch.msgid.link/aOh1le4YqtYwj-hH@osx.local
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2025-10-19 07:31:25 -04:00
..
Makefile RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
addr.c RDMA/core: Use route entry flag to decide on loopback traffic 2025-09-18 05:20:35 -04:00
agent.c RDMA: Use %pe format specifier for error pointers 2025-09-21 07:34:49 -04:00
agent.h
cache.c RDMA/core: Rate limit GID cache warning messages 2025-06-17 14:14:53 -03:00
cgroup.c
cm.c RDMA/cm: Rate limit destroy CM ID timeout error message 2025-09-15 03:41:45 -04:00
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
cma.c RDMA/cma: Support IB service record resolution 2025-08-13 06:16:00 -04:00
cma_configfs.c
cma_priv.h RDMA/cma: Support IB service record resolution 2025-08-13 06:16:00 -04:00
cma_trace.c
cma_trace.h IB/cm: Remove dead code and adjust naming 2025-05-25 06:24:21 -04:00
core_priv.h
counters.c RDMA/counter: Check CAP_NET_RAW check in user namespace for RDMA counters 2025-07-02 05:11:44 -04:00
cq.c RDMA/core: Add driver APIs pre_destroy_cq() and post_destroy_cq() 2025-06-25 03:49:51 -04:00
device.c RDMA/core: fix "truely"->"truly" 2025-09-11 02:18:35 -04:00
ib_core_uverbs.c
iwcm.c RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction 2025-05-13 07:08:37 -04:00
iwcm.h
iwpm_msg.c
iwpm_util.c
iwpm_util.h
lag.c
mad.c IB/cm: Use separate agent w/o flow control for REP 2025-07-09 02:51:35 -04:00
mad_priv.h IB/mad: Add flow control for solicited MADs 2025-07-09 02:51:30 -04:00
mad_rmpp.c IB/mad: Add state machine to MAD layer 2025-07-09 02:51:23 -04:00
mad_rmpp.h
mr_pool.c
multicast.c
netlink.c
nldev.c RDMA/nldev: Check CAP_NET_RAW in user namespace for QP modify 2025-07-02 05:11:44 -04:00
opa_smi.h
packer.c
rdma_core.c RDMA/uverbs: Check CAP_NET_RAW in user namespace for flow create 2025-07-01 05:21:27 -04:00
rdma_core.h RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
restrack.c RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
restrack.h
roce_gid_mgmt.c RDMA/core: Implement RoCE GID port rescan and export delete function 2024-11-04 06:57:21 -05:00
rw.c
sa.h
sa_query.c IB/sa: Fix sa_local_svc_timeout_ms read race 2025-09-18 05:26:26 -04:00
security.c
smi.c
smi.h
sysfs.c RDMA/core: Don't expose hw_counters outside of init net namespace 2025-03-03 07:14:48 -05:00
trace.c
ucaps.c RDMA/ucaps: Avoid format-security warning 2025-04-07 14:55:32 -03:00
ucma.c RDMA/ucma: Support write an event into a CM 2025-08-13 06:16:11 -04:00
ud_header.c RDMA/core: Remove unused ib_ud_header_unpack 2024-12-24 05:00:42 -05:00
umem.c RDMA/core: Fix best page size finding when it can cross SG entries 2025-02-19 07:17:39 -05:00
umem_dmabuf.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
umem_odp.c RDMA/core: Free pfn_list with appropriate kvfree call 2025-08-13 07:00:21 -04:00
user_mad.c
uverbs.h RDMA/core: Move ib_uverbs_file struct to uverbs_types.h 2024-11-04 06:57:21 -05:00
uverbs_cmd.c IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00
uverbs_ioctl.c
uverbs_main.c RDMA/uverbs: Introduce UCAP (User CAPabilities) API 2025-03-09 13:13:02 -04: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.c
uverbs_std_types_async_fd.c
uverbs_std_types_counters.c
uverbs_std_types_cq.c RDMA/uverbs: Fix umem release in UVERBS_METHOD_CQ_CREATE 2025-10-19 07:31:25 -04:00
uverbs_std_types_device.c RDMA/uverbs: Add support for UCAPs in context creation 2025-03-09 13:13:02 -04:00
uverbs_std_types_dm.c
uverbs_std_types_dmah.c RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04: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/uverbs: Check CAP_NET_RAW in user namespace for RAW QP create 2025-07-01 05:21:44 -04:00
uverbs_std_types_srq.c
uverbs_std_types_wq.c
uverbs_uapi.c RDMA/core: Introduce a DMAH object and its alloc/free APIs 2025-07-23 01:42:10 -04:00
verbs.c IB: Extend UVERBS_METHOD_REG_MR to get DMAH 2025-07-23 01:42:11 -04:00