From 5bdd24e451c711129218c88292cae8e891e7506a Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Mon, 12 Jun 2017 12:34:30 +0800 Subject: [PATCH] net/virtio: zero the whole memory zone Zero the whole memory zone instead of the first few bytes. Fixes: c1f86306a026 ("virtio: add new driver") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 4fcda80de3..371f170572 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -424,7 +424,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx) } } - memset(mz->addr, 0, sizeof(mz->len)); + memset(mz->addr, 0, mz->len); vq->vq_ring_mem = mz->phys_addr; vq->vq_ring_virt_mem = mz->addr; -- 2.20.1