mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
iw_cxgb4: Fix potential NULL dereference in c4iw_fill_res_cm_id_entry()
[ Upstream commit4ca446b127
] 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>
This commit is contained in:
parent
f139c15c6c
commit
24278dc380
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ int c4iw_fill_res_cm_id_entry(struct sk_buff *msg,
|
|||
if (rdma_nl_put_driver_u64_hex(msg, "history", epcp->history))
|
||||
goto err_cancel_table;
|
||||
|
||||
if (epcp->state == LISTEN) {
|
||||
if (listen_ep) {
|
||||
if (rdma_nl_put_driver_u32(msg, "stid", listen_ep->stid))
|
||||
goto err_cancel_table;
|
||||
if (rdma_nl_put_driver_u32(msg, "backlog", listen_ep->backlog))
|
||||
|
|
Loading…
Reference in a new issue