Skip to content

Commit

Permalink
proc/cxi: Fix possible cq_open segfault
Browse files Browse the repository at this point in the history
Fix possible CQ segfault when NULL attributes passed to open.
Error was introduced commit 0ad502e.

Signed-off-by: Steve Welch <welch@hpe.com>
  • Loading branch information
swelch committed Mar 3, 2025
1 parent fddf018 commit 9b87ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prov/cxi/src/cxip_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ int cxip_cq_open(struct fid_domain *domain, struct fi_cq_attr *attr,
}

cxi_cq->util_cq.cq_fid.fid.ops = &cxip_cq_fi_ops;
if (!(attr->flags & FI_PEER))
if (!(cxi_cq->attr.flags & FI_PEER))
cxi_cq->util_cq.cq_fid.ops = &cxip_cq_ops;
cxi_cq->domain = cxi_dom;
cxi_cq->ack_batch_size = cxip_env.eq_ack_batch_size;
Expand Down

0 comments on commit 9b87ce6

Please sign in to comment.