android_kernel_samsung_sm8650/drivers/infiniband/hw/cxgb4
Dan Carpenter 24278dc380 iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry()
[ Upstream commit 4ca446b127c568b59cb8d9748b6f70499624bb18 ]

This condition needs to match the previous "if (epcp->state == LISTEN) {"
exactly to avoid a NULL dereference of either "listen_ep" or "ep". The
problem is that "epcp" has been re-assigned so just testing
"if (epcp->state == LISTEN) {" a second time is not sufficient.

Fixes: 116aeb8873 ("iw_cxgb4: provide detailed provider-specific CM_ID information")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y+usKuWIKr4dimZh@kili
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:39 +01:00
..
cm.c RDMA/cxgb4: Fix potential null-ptr-deref in pass_establish() 2023-03-10 09:33:36 +01:00
cq.c RDMA/iw_cxgb4: Fix refcount underflow while destroying cqs. 2021-08-05 22:33:00 -03:00
device.c RDMA: Remove redundant 'flush_workqueue()' calls 2021-10-12 13:21:23 -03:00
ev.c RDMA/iw_cxgb4: Fix refcount underflow while destroying cqs. 2021-08-05 22:33:00 -03:00
id_table.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
iw_cxgb4.h RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mem.c RDMA/cxgb4: Remove MW support 2020-10-26 19:27:44 -03:00
provider.c RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
qp.c RDMA/cxgb4: Set queue pair state when being queried 2022-01-05 15:51:51 -04:00
resource.c RDMA/cxgb4: add missing qpid increment 2021-04-20 09:36:00 -03:00
restrack.c iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry() 2023-03-10 09:33:39 +01:00
t4.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
t4fw_ri_api.h RDMA: Replace zero-length array with flexible-array member 2020-02-20 13:33:51 -04:00