From 9b87ce65e7044b8342b33db643795e3c02abe02e Mon Sep 17 00:00:00 2001 From: Steve Welch Date: Mon, 3 Mar 2025 11:35:47 -0600 Subject: [PATCH] proc/cxi: Fix possible cq_open segfault Fix possible CQ segfault when NULL attributes passed to open. Error was introduced commit 0ad502e. Signed-off-by: Steve Welch --- prov/cxi/src/cxip_cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prov/cxi/src/cxip_cq.c b/prov/cxi/src/cxip_cq.c index f01fb72fa98..e3417d141e8 100644 --- a/prov/cxi/src/cxip_cq.c +++ b/prov/cxi/src/cxip_cq.c @@ -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;