[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] hw/rdma: Fix possible usage of a NULL point
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] hw/rdma: Fix possible usage of a NULL pointer |
Date: |
Tue, 1 May 2018 00:04:48 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/30/2018 05:02 PM, Marcel Apfelbaum wrote:
> Coverity CID 1390586; The cq handle is provided by the guest
> and cannot be trusted to be previuosly allocated.
> Fix it by exiting the completion flow.
>
> Reported-by: Peter Maydell <address@hidden>
> Signed-off-by: Marcel Apfelbaum <address@hidden>
> Reviewed-by: Yuval Shaia <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/rdma/vmw/pvrdma_qp_ops.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c
> index 750ade6c31..99bb51111e 100644
> --- a/hw/rdma/vmw/pvrdma_qp_ops.c
> +++ b/hw/rdma/vmw/pvrdma_qp_ops.c
> @@ -216,6 +216,7 @@ void pvrdma_cq_poll(RdmaDeviceResources *dev_res,
> uint32_t cq_handle)
> cq = rdma_rm_get_cq(dev_res, cq_handle);
> if (!cq) {
> pr_dbg("Invalid CQ# %d\n", cq_handle);
> + return;
> }
>
> rdma_backend_poll_cq(dev_res, &cq->backend_cq);
>
- [Qemu-devel] [PATCH 0/7] hw/rdma: coverity fixes, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 1/7] hw/rdma: Fix possible munmap call on a NULL pointer, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 3/7] hw/rdma: Delete port's pkey table, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 4/7] hw/rdma: Fix possible out of bounds access to GID table, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 2/7] hw/rdma: Fix possible usage of a NULL pointer, Marcel Apfelbaum, 2018/04/30
- Re: [Qemu-devel] [PATCH 2/7] hw/rdma: Fix possible usage of a NULL pointer,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH 5/7] hw/rdma: Fix possible out of bounds access to regs array, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 6/7] hw/rdma: Delete duplicate definition of MAX_RM_TBL_NAME, Marcel Apfelbaum, 2018/04/30
- [Qemu-devel] [PATCH 7/7] hw/rdma: Fix possible out of bounds access to port GID index, Marcel Apfelbaum, 2018/04/30