From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>, stable@dpdk.org
Subject: [PATCH v2 2/2] vhost: fix uninitialized VQ info in VDUSE vring setup
Date: Tue, 16 Sep 2025 11:35:50 +0200 [thread overview]
Message-ID: <20250916093550.1345901-3-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20250916093550.1345901-1-maxime.coquelin@redhat.com>
Initialize vduse_vq_info structure to zero to avoid using
uninitialized memory when setting up VDUSE virtual rings.
This ensures all fields start with known values.
Fixes: a9120db8b98b ("vhost: add VDUSE device startup")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/vhost/vduse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 422c4ab8f3..6f286c2963 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -141,7 +141,7 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index, bool reconnect)
{
struct vhost_virtqueue *vq = dev->virtqueue[index];
struct vhost_vring_addr *ra = &vq->ring_addrs;
- struct vduse_vq_info vq_info;
+ struct vduse_vq_info vq_info = { 0 };
struct vduse_vq_eventfd vq_efd;
int ret;
--
2.51.0
next prev parent reply other threads:[~2025-09-16 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 9:35 [PATCH v2 0/2] vhost: VDUSE startup workaround and fix Maxime Coquelin
2025-09-16 9:35 ` [PATCH v2 1/2] vhost: add VDUSE virtqueue ready state polling workaround Maxime Coquelin
2025-09-16 9:35 ` Maxime Coquelin [this message]
2025-09-16 13:09 ` [PATCH v2 0/2] vhost: VDUSE startup workaround and fix Patrick Robb
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=20250916093550.1345901-3-maxime.coquelin@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=chenbox@nvidia.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.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).