From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by dpdk.org (Postfix) with ESMTP id AD04CFEB for ; Mon, 13 Aug 2018 17:51:18 +0200 (CEST) Received: by mail-pl0-f66.google.com with SMTP id t17-v6so7037864ply.13 for ; Mon, 13 Aug 2018 08:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HdTc+aFWZnWhc7qAJyjFVaM37LaKMjz2DJGzxSf8YmI=; b=WgEj8ieiLUvLHUaS4dgfiPxxtydJ++GyCJ77mmzzpKYrxVJzYIc/E/4zzLFNgJpvUb nL+5iyr1eHPhfNngCLu9mfyU+TZ14IcDaijVjeB5TrMb4DcNbBT17AdXygVfHfUG/Ti2 6oS+Jnem9ra8M2BAAkKZJt7mwtXxtw4kkMdM5lhuO0xBSRlW6HQHMjBxXbrJSmDp7X3g SprqhK/YaVH4YqZwW/i4QNrwuZIz6JWpw25QVneBNX+Lf+OBRElaThYepuYXu1goVp0T tOMGKf5L3LbEnItH9BXRrtvA0yfCh+1cyFEtDeUKng1DppfD4jZ3EWaansTpfV/DYMCH qg7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HdTc+aFWZnWhc7qAJyjFVaM37LaKMjz2DJGzxSf8YmI=; b=MRsEnwL+P9lOkblFcftGYyxSewoOJraYm2nt78p9a/GKDvjlS4tdDQFnzUetcIDA3Z Y8jW+mL0lx+P06pl+GKAMuFkdgiaKDMSDQztm6LQBLY/4aW+9U6akZTI3HZ3+QmenkBc K7BBP0ekGw3TY2Lr0KbgbvMUdc6YQT5Ee2A8Ns4pT6XSxzUF5s2T/JNmNcO9CLWTccdL tTV9geFumXOScXXCyUmmqYnfusnOGKxgxd+LeKz4sx2c4aj4GQJNQV6jWpyF6vVgpwnX CUHVaIdZjHLaHzhAxUtySWZAv43w4tcnbQky/pAW/RLZaI+Ke5xWcaszPE4hOVwcOh6s +qWg== X-Gm-Message-State: AOUpUlG8EqjZzmsT3bfwF9r6dc9wTdvEWvaaMK2uOZahanZGL3vd7gMH BiqRt8JrwQC3jRp/7KyQwHWnUAEZlMY= X-Google-Smtp-Source: AA+uWPyG+Cm34q+wXtSXp5FKoweFaq+IRL8ZiTIoBK3duYBg6vXRDoVjx5zLCQH9lAIIEbPAKDslWA== X-Received: by 2002:a17:902:42e2:: with SMTP id h89-v6mr17162786pld.69.1534175477668; Mon, 13 Aug 2018 08:51:17 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id m30-v6sm22018241pff.121.2018.08.13.08.51.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 08:51:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Mon, 13 Aug 2018 08:51:07 -0700 Message-Id: <20180813155108.6460-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180813155108.6460-1-stephen@networkplumber.org> References: <20180813155108.6460-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH v2 1/2] netvsc: fix rte malloc pool corruption X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2018 15:51:18 -0000 The event buffer was changed to be a fixed size value, but calls to rte_free were left. That causes bugs because it calls to rte_free() for a pointer that was not setup with rte_malloc(). Fixes: 530af95a7849 ("bus/vmbus: avoid signalling host on read") Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_rxtx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 02ef27e363cc..3e52a328b152 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -776,7 +776,6 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev, fail: rte_ring_free(rxq->rx_ring); - rte_free(rxq->event_buf); rte_free(rxq); return -ENOMEM; } @@ -795,10 +794,8 @@ hn_dev_rx_queue_release(void *arg) rxq->rx_ring = NULL; rxq->mb_pool = NULL; - if (rxq != rxq->hv->primary) { - rte_free(rxq->event_buf); + if (rxq != rxq->hv->primary) rte_free(rxq); - } } void -- 2.18.0