>From 666b9d67dda0fd01e90ceb93b189a773d14916d5 Mon Sep 17 00:00:00 2001
From: Jon Mason <[EMAIL PROTECTED]>
Date: Tue, 12 Feb 2008 14:08:02 -0600
Subject: [PATCH] The wc_flags field in struct ibv_wc is left uninitialized in
iwch_poll_cq_one. User space applications may check this field and
deterministically perform actions based on the garbage in the field.
Zeroing this out will prevent this unintended behavior.
Signed-off-by: Jon Mason <[EMAIL PROTECTED]>
---
src/cq.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/cq.c b/src/cq.c
index d27c6b7..fcf91c8 100644
--- a/src/cq.c
+++ b/src/cq.c
@@ -277,6 +277,7 @@ int iwch_poll_cq_one(struct iwch_device *rhp, struct
iwch_cq *chp,
wc->wr_id = cookie;
wc->qp_num = qhp->wq.qpid;
wc->vendor_err = CQE_STATUS(cqe);
+ wc->wc_flags = 0;
PDBG("%s qpid 0x%x type %d opcode %d status 0x%x wrid hi 0x%x "
"lo 0x%x cookie 0x%" PRIx64 "\n",
--
1.5.3.3
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general