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 RDMA/core: Add necessary spaces 2021-04-12 14:52:22 -03:00
cm_trace.c RDMA/cm: Replace pr_debug() call sites with tracepoints 2020-08-24 19:41:41 -03:00
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 RDMA/cma: Fix truncation compilation warning in make_cma_ports 2023-09-18 11:52:10 +03:00
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 RDMA/core: Remove unused declaration rdma_resolve_ip_route() 2024-08-19 15:19:52 -03:00
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 RDMA/core: Use refcount_t instead of atomic_t on refcount of iwcm_id_private 2021-06-08 14:35:44 -03:00
iwpm_msg.c RDMA/iwpm: Rely on the rdma_nl_[un]register() to ensure that requests are valid 2021-07-30 10:01:41 -03:00
iwpm_util.c RDMA: Remove unnecessary NULL values 2023-08-07 16:56:57 +03:00
iwpm_util.h RDMA/core: Delete useless module.h include 2022-01-28 13:03:12 -04:00
lag.c RDMA/core: Remove NULL check before dev_{put, hold} 2024-05-05 15:12:35 +03:00
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 RDMA/core: Use refcount_t instead of atomic_t on refcount of mcast_port 2021-06-08 14:45:07 -03:00
netlink.c RDMA/nldev: Add support for RDMA monitoring 2024-09-13 08:29:14 +03:00
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 RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
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 RDMA/restrack: Improve readability in task name management 2020-09-22 19:47:35 -03:00
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 RDMA/core: Fix a couple of obvious typos in comments 2023-10-04 21:55:44 +03:00
sa.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
sa_query.c IB/sa: Fix sa_local_svc_timeout_ms read race 2025-09-18 05:26:26 -04:00
security.c IB/core: Removed port validity check from ib_get_cached_subnet_prefix 2021-06-21 20:49:32 -03:00
smi.c RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
smi.h RDMA: Support more than 255 rdma ports 2021-03-26 09:31:21 -03:00
sysfs.c RDMA/core: Don't expose hw_counters outside of init net namespace 2025-03-03 07:14:48 -05:00
trace.c RDMA/core: Clean up tracepoint headers 2020-07-06 14:54:46 -03:00
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 [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
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 RDMA/uverbs: Avoid -Wflex-array-member-not-at-end warnings 2024-03-03 15:38:44 +02:00
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 RDMA/core: Make FD destroy callback void 2020-11-12 12:32:17 -04:00
uverbs_std_types_async_fd.c RDMA/core: Make FD destroy callback void 2020-11-12 12:32:17 -04:00
uverbs_std_types_counters.c IB/uverbs: Fix an potential error pointer dereference 2023-08-07 16:49:59 +03:00
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 RDMA/core: Postpone uobject cleanup on failure till FD close 2020-11-12 12:32:17 -04:00
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 RDMA/core: Delete IPsec flow action logic from the core 2022-04-09 08:25:06 +03:00
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 RDMA/core: Postpone uobject cleanup on failure till FD close 2020-11-12 12:32:17 -04:00
uverbs_std_types_wq.c RDMA/core: Postpone uobject cleanup on failure till FD close 2020-11-12 12:32:17 -04:00
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