From: Jason Wang <jasowang@redhat.com>
To: Cindy Lu <lulu@redhat.com>, mst@redhat.com, peter.maydell@linaro.org
Cc: mhabets@solarflare.com, qemu-devel@nongnu.org,
rob.miller@broadcom.com, saugatm@xilinx.com, hanand@xilinx.com,
hch@infradead.org, eperezma@redhat.com, jgg@mellanox.com,
shahafs@mellanox.com, kevin.tian@intel.com, parav@mellanox.com,
vmireyno@marvell.com, cunming.liang@intel.com, gdawar@xilinx.com,
jiri@mellanox.com, xiao.w.wang@intel.com, stefanha@redhat.com,
zhihong.wang@intel.com, ian@iankelling.org, aadam@redhat.com,
rdunlap@infradead.org, maxime.coquelin@redhat.com,
lingshan.zhu@intel.com
Subject: Re: [PATCH v2] vhost-vdpa :Fix Coverity CID 1430270 / CID 1420267
Date: Fri, 10 Jul 2020 17:14:33 +0800 [thread overview]
Message-ID: <60661311-2f76-9c6b-f2c6-d9f522dbbf10@redhat.com> (raw)
In-Reply-To: <20200710064642.24505-1-lulu@redhat.com>
On 2020/7/10 下午2:46, Cindy Lu wrote:
> In the function vhost_vdpa_dma_map/unmap, The struct msg was not initialized all its fields.
>
> Signed-off-by: Cindy Lu <lulu@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
> ---
> hw/virtio/vhost-vdpa.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
> index a3d17fe0f9..b9265f3761 100644
> --- a/hw/virtio/vhost-vdpa.c
> +++ b/hw/virtio/vhost-vdpa.c
> @@ -38,7 +38,7 @@ static bool vhost_vdpa_listener_skipped_section(MemoryRegionSection *section)
> static int vhost_vdpa_dma_map(struct vhost_vdpa *v, hwaddr iova, hwaddr size,
> void *vaddr, bool readonly)
> {
> - struct vhost_msg_v2 msg;
> + struct vhost_msg_v2 msg = {};
> int fd = v->device_fd;
> int ret = 0;
>
> @@ -61,7 +61,7 @@ static int vhost_vdpa_dma_map(struct vhost_vdpa *v, hwaddr iova, hwaddr size,
> static int vhost_vdpa_dma_unmap(struct vhost_vdpa *v, hwaddr iova,
> hwaddr size)
> {
> - struct vhost_msg_v2 msg;
> + struct vhost_msg_v2 msg = {};
> int fd = v->device_fd;
> int ret = 0;
>
next prev parent reply other threads:[~2020-07-10 9:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 6:46 [PATCH v2] vhost-vdpa :Fix Coverity CID 1430270 / CID 1420267 Cindy Lu
2020-07-10 8:07 ` Peter Maydell
2020-07-10 9:14 ` Jason Wang [this message]
2020-07-10 10:29 ` Li Qiang
2020-07-23 17:55 ` Peter Maydell
2020-07-27 13:29 ` Michael S. Tsirkin
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=60661311-2f76-9c6b-f2c6-d9f522dbbf10@redhat.com \
--to=jasowang@redhat.com \
--cc=aadam@redhat.com \
--cc=cunming.liang@intel.com \
--cc=eperezma@redhat.com \
--cc=gdawar@xilinx.com \
--cc=hanand@xilinx.com \
--cc=hch@infradead.org \
--cc=ian@iankelling.org \
--cc=jgg@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kevin.tian@intel.com \
--cc=lingshan.zhu@intel.com \
--cc=lulu@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mhabets@solarflare.com \
--cc=mst@redhat.com \
--cc=parav@mellanox.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rdunlap@infradead.org \
--cc=rob.miller@broadcom.com \
--cc=saugatm@xilinx.com \
--cc=shahafs@mellanox.com \
--cc=stefanha@redhat.com \
--cc=vmireyno@marvell.com \
--cc=xiao.w.wang@intel.com \
--cc=zhihong.wang@intel.com \
/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).