From: Yuval Shaia <yuval.shaia@oracle.com>
To: qemu-devel@nongnu.org, yuval.shaia@oracle.com,
marcel.apfelbaum@gmail.com
Subject: [Qemu-devel] [PATCH] hw/rdma: Abort send-op if fail to create addr handler
Date: Tue, 14 Aug 2018 13:00:10 +0300 [thread overview]
Message-ID: <20180814100010.2546-1-yuval.shaia@oracle.com> (raw)
Function create_ah might return NULL, let's exit with an error.
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
hw/rdma/rdma_backend.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index 35726bda2e..59d02eb567 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -402,6 +402,10 @@ void rdma_backend_post_send(RdmaBackendDev *backend_dev,
if (qp_type == IBV_QPT_UD) {
wr.wr.ud.ah = create_ah(backend_dev, qp->ibpd,
backend_dev->backend_gid_idx, dgid);
+ if (!wr.wr.ud.ah) {
+ comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_FAIL_BACKEND, ctx, 0);
+ goto out_dealloc_cqe_ctx;
+ }
wr.wr.ud.remote_qpn = dqpn;
wr.wr.ud.remote_qkey = dqkey;
}
--
2.17.1
next reply other threads:[~2018-08-14 10:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 10:00 Yuval Shaia [this message]
2018-08-16 6:29 ` [Qemu-devel] [PATCH] hw/rdma: Abort send-op if fail to create addr handler no-reply
2018-08-16 8:56 ` Yuval Shaia
2018-08-16 8:57 ` Marcel Apfelbaum
2018-08-17 6:38 ` no-reply
2018-08-18 13:46 ` Marcel Apfelbaum
2018-08-18 13:58 ` Yuval Shaia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180814100010.2546-1-yuval.shaia@oracle.com \
--to=yuval.shaia@oracle.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).