Skip to content
Commit 283861a4 authored by Nikita Zhandarovich's avatar Nikita Zhandarovich Committed by Leon Romanovsky
Browse files

RDMA/cxgb4: Fix potential null-ptr-deref in pass_establish()



If get_ep_from_tid() fails to lookup non-NULL value for ep, ep is
dereferenced later regardless of whether it is empty.
This patch adds a simple sanity check to fix the issue.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 944661dd ("RDMA/iw_cxgb4: atomically lookup ep and get a reference")
Signed-off-by: default avatarNikita Zhandarovich <n.zhandarovich@fintech.ru>
Link: https://lore.kernel.org/r/20230202184850.29882-1-n.zhandarovich@fintech.ru


Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 85f9e38a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment