* [dpdk-stable] [PATCH v2 1/4] vhost: fix uninitialized vhost queue
[not found] ` <1617368642-131298-1-git-send-email-jiayu.hu@intel.com>
@ 2021-04-02 13:03 ` Jiayu Hu
2021-04-13 11:30 ` Maxime Coquelin
0 siblings, 1 reply; 2+ messages in thread
From: Jiayu Hu @ 2021-04-02 13:03 UTC (permalink / raw)
To: dev
Cc: maxime.coquelin, chenbo.xia, yinan.wang, sunil.pai.g,
cheng1.jiang, Jiayu Hu, stable
This patch allocates vhost queue by rte_zmalloc() to avoid
undefined values.
Fixes: a277c7159876 ("vhost: refactor code structure")
Cc: stable@dpdk.org
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
---
lib/librte_vhost/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index c9d1371..8657bbe 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -609,7 +609,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
if (dev->virtqueue[i])
continue;
- vq = rte_malloc(NULL, sizeof(struct vhost_virtqueue), 0);
+ vq = rte_zmalloc(NULL, sizeof(struct vhost_virtqueue), 0);
if (vq == NULL) {
VHOST_LOG_CONFIG(ERR,
"Failed to allocate memory for vring:%u.\n", i);
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH v2 1/4] vhost: fix uninitialized vhost queue
2021-04-02 13:03 ` [dpdk-stable] [PATCH v2 1/4] vhost: fix uninitialized vhost queue Jiayu Hu
@ 2021-04-13 11:30 ` Maxime Coquelin
0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2021-04-13 11:30 UTC (permalink / raw)
To: Jiayu Hu, dev; +Cc: chenbo.xia, yinan.wang, sunil.pai.g, cheng1.jiang, stable
On 4/2/21 3:03 PM, Jiayu Hu wrote:
> This patch allocates vhost queue by rte_zmalloc() to avoid
> undefined values.
>
> Fixes: a277c7159876 ("vhost: refactor code structure")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
> lib/librte_vhost/vhost.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
> index c9d1371..8657bbe 100644
> --- a/lib/librte_vhost/vhost.c
> +++ b/lib/librte_vhost/vhost.c
> @@ -609,7 +609,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
> if (dev->virtqueue[i])
> continue;
>
> - vq = rte_malloc(NULL, sizeof(struct vhost_virtqueue), 0);
> + vq = rte_zmalloc(NULL, sizeof(struct vhost_virtqueue), 0);
> if (vq == NULL) {
> VHOST_LOG_CONFIG(ERR,
> "Failed to allocate memory for vring:%u.\n", i);
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-13 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1615985773-406787-1-git-send-email-jiayu.hu@intel.com>
[not found] ` <1617368642-131298-1-git-send-email-jiayu.hu@intel.com>
2021-04-02 13:03 ` [dpdk-stable] [PATCH v2 1/4] vhost: fix uninitialized vhost queue Jiayu Hu
2021-04-13 11:30 ` Maxime Coquelin
patches for DPDK stable branches
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
stable@dpdk.org
public-inbox-index stable
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.stable
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git