From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id BB60FDE3; Mon, 12 Jun 2017 06:40:06 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 11 Jun 2017 21:40:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,332,1493708400"; d="scan'208";a="96964935" Received: from dpdk25.sh.intel.com ([10.239.129.158]) by orsmga004.jf.intel.com with ESMTP; 11 Jun 2017 21:40:03 -0700 From: Tiwei Bie To: dev@dpdk.org Cc: yliu@fridaylinux.org, maxime.coquelin@redhat.com, mtetsuyah@gmail.com, stable@dpdk.org Date: Mon, 12 Jun 2017 12:34:30 +0800 Message-Id: <1497242070-68791-1-git-send-email-tiwei.bie@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] [PATCH] net/virtio: zero the whole memory zone X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 04:40:07 -0000 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 --- 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 45f9bca..88118f1 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.7.4