On Tue, Aug 14, 2018 at 01:00:10PM +0300, Yuval Shaia wrote: > Function create_ah might return NULL, let's exit with an error. > > Signed-off-by: Yuval Shaia <yuval.sh...@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);
This change is based on a patch i sent at Aug 5, "Misc fixes for pvrdma device", without it build fails. I will re-post this patch as soon as the patch-set will be pulled. > + goto out_dealloc_cqe_ctx; > + } > wr.wr.ud.remote_qpn = dqpn; > wr.wr.ud.remote_qkey = dqkey; > } > -- > 2.17.1 >