Skip to content

Commit f89782c

Browse files
Dan Carpenterdavem330
authored andcommitted
qed: Use after free in qed_rdma_free()
We're dereferencing "p_hwfn->p_rdma_info" but that is freed on the line before in qed_rdma_resc_free(p_hwfn). Fixes: 9de506a ("qed: Free RoCE ILT Memory on rmmod qedr") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Michal Kalderon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d2ddf62 commit f89782c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qed/qed_rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ static void qed_rdma_free(struct qed_hwfn *p_hwfn)
379379
DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Freeing RDMA\n");
380380

381381
qed_rdma_free_reserved_lkey(p_hwfn);
382-
qed_rdma_resc_free(p_hwfn);
383382
qed_cxt_free_proto_ilt(p_hwfn, p_hwfn->p_rdma_info->proto);
383+
qed_rdma_resc_free(p_hwfn);
384384
}
385385

386386
static void qed_rdma_get_guid(struct qed_hwfn *p_hwfn, u8 *guid)

0 commit comments

Comments
 (0)