linux-brain/drivers/infiniband/core
Gerd Rausch 032c68b4f5 RDMA/cma: Fix rdma_resolve_route() memory leak
[ Upstream commit 74f160ead74bfe5f2b38afb4fcf86189f9ff40c9 ]

Fix a memory leak when "mda_resolve_route() is called more than once on
the same "rdma_cm_id".

This is possible if cma_query_handler() triggers the
RDMA_CM_EVENT_ROUTE_ERROR flow which puts the state machine back and
allows rdma_resolve_route() to be called again.

Link: https://lore.kernel.org/r/f6662b7b-bdb7-2706-1e12-47c61d3474b6@oracle.com
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-19 08:53:13 +02:00
..
Makefile RDMA/counter: Add set/clear per-port auto mode support 2019-07-05 10:22:54 -03:00
addr.c RDMA/addr: Be strict with gid size 2021-04-14 08:24:18 +02:00
agent.c
agent.h
cache.c IB/core: Fix potential NULL pointer dereference in pkey cache 2020-05-20 08:20:26 +02:00
cgroup.c
cm.c IB/cm: Avoid a loop when device has 255 ports 2021-03-04 10:26:32 +01:00
cm_msgs.h
cma.c RDMA/cma: Fix rdma_resolve_route() memory leak 2021-07-19 08:53:13 +02:00
cma_configfs.c IB/cma: Fix ports memory leak in cma_configfs 2020-06-24 17:50:32 +02:00
cma_priv.h
core_priv.h RDMA/core: Fix protection fault in ib_mr_pool_destroy 2020-03-12 13:00:29 +01:00
counters.c RDMA/counter: Allow manually bind QPs with different pids to same counter 2020-08-21 13:05:32 +02:00
cq.c rdma: Enable ib_alloc_cq to spread work over a device's comp_vectors 2019-08-05 11:50:32 -04:00
device.c RDMA/core: Do not indicate device ready when device enablement fails 2020-12-30 11:51:23 +01:00
fmr_pool.c RDMA: Delete DEBUG code 2019-08-20 13:27:53 -04:00
iwcm.c RDMA/iwcm: Fix iwcm work deallocation 2020-03-12 13:00:29 +01:00
iwcm.h
iwpm_msg.c RDMA/iwpm: Delete unnecessary checks before the macro call "dev_kfree_skb" 2019-08-27 13:09:23 -03:00
iwpm_util.c RDMA/iwpm: Delete unnecessary checks before the macro call "dev_kfree_skb" 2019-08-27 13:09:23 -03:00
iwpm_util.h
mad.c RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads() 2020-06-30 15:36:58 -04:00
mad_priv.h
mad_rmpp.c
mad_rmpp.h
mr_pool.c
multicast.c
netlink.c IB/core: Avoid deadlock during netlink message handling 2019-10-24 20:49:37 -03:00
nldev.c RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP 2020-08-19 08:16:17 +02:00
opa_smi.h
packer.c
rdma_core.c RDMA/core: Fix double destruction of uobject 2020-06-03 08:21:25 +02:00
rdma_core.h
restrack.c RDMA/restrack: Don't treat as an error allocation ID wrapping 2021-01-19 18:26:17 +01:00
restrack.h RDMA/restrack: Make is_visible_in_pid_ns() as an API 2019-07-05 10:22:54 -03:00
roce_gid_mgmt.c
rw.c RDMA/rw: Fix error flow during RDMA context initialization 2020-03-12 13:00:29 +01:00
sa.h
sa_query.c IB/sa: Resolv use-after-free in ib_nl_make_request() 2020-07-16 08:16:38 +02:00
security.c RDMA/core: Ensure security pkey modify is not lost 2020-04-01 11:02:04 +02:00
smi.c
smi.h
sysfs.c RDMA/core: Fix several reference count leaks. 2020-06-24 17:50:17 +02:00
ucma.c RDMA/ucma: Add missing locking around rdma_leave_multicast() 2020-10-29 09:57:46 +01:00
ud_header.c
umem.c RDMA/umem: Prevent small pages from being returned by ib_umem_find_best_pgsz() 2020-10-29 09:57:48 +01:00
umem_odp.c IB/core: Fix ODP get user pages flow 2020-02-11 04:35:46 -08:00
user_mad.c IB/umad: Return EPOLLERR in case of when device disassociated 2021-03-04 10:26:31 +01:00
uverbs.h RDMA/uverbs: Prevent potential underflow 2019-10-22 15:05:36 -03:00
uverbs_cmd.c RDMA/core: Sanitize WQ state received from the userspace 2021-07-14 16:53:27 +02:00
uverbs_ioctl.c mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options 2019-07-12 11:05:46 -07:00
uverbs_main.c RDMA/uverbs: Make the event_queue fds return POLLERR when disassociated 2020-06-17 16:40:22 +02:00
uverbs_marshall.c
uverbs_std_types.c
uverbs_std_types_counters.c
uverbs_std_types_cq.c
uverbs_std_types_device.c RDMA/uverbs: Fix a NULL vs IS_ERR() bug 2021-05-26 12:05:15 +02:00
uverbs_std_types_dm.c
uverbs_std_types_flow_action.c
uverbs_std_types_mr.c
uverbs_uapi.c
verbs.c RDMA/core: Fix reported speed and width 2020-09-17 13:47:43 +02:00