From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 877E0C28CC5 for ; Wed, 5 Jun 2019 12:36:12 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4FEA1206BA for ; Wed, 5 Jun 2019 12:36:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FEA1206BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 306141BAB6; Wed, 5 Jun 2019 14:36:11 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 628271BA8F; Wed, 5 Jun 2019 14:36:10 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 48AF930BB54A; Wed, 5 Jun 2019 12:36:02 +0000 (UTC) Received: from [10.36.112.53] (ovpn-112-53.ams2.redhat.com [10.36.112.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FF6C17CE5; Wed, 5 Jun 2019 12:35:58 +0000 (UTC) To: Tiwei Bie , zhihong.wang@intel.com, dev@dpdk.org Cc: stable@dpdk.org References: <20190605094342.17563-1-tiwei.bie@intel.com> <20190605094342.17563-2-tiwei.bie@intel.com> From: Maxime Coquelin Message-ID: <3d8745ac-b8ed-efac-cc70-687f52cdd4ce@redhat.com> Date: Wed, 5 Jun 2019 14:35:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190605094342.17563-2-tiwei.bie@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 05 Jun 2019 12:36:09 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 1/5] net/virtio: fix queue memory leak on error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/5/19 11:43 AM, Tiwei Bie wrote: > We should free queues when we failed to initialize the > virtio device. > > Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts") > Cc: stable@dpdk.org > > Signed-off-by: Tiwei Bie > --- > drivers/net/virtio/virtio_ethdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index c4570bbf8..df3a218a8 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1752,6 +1752,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features) > if (eth_dev->data->dev_conf.intr_conf.rxq) { > if (virtio_configure_intr(eth_dev) < 0) { > PMD_INIT_LOG(ERR, "failed to configure interrupt"); > + virtio_free_queues(hw); > return -1; > } > } > Reviewed-by: Maxime Coquelin Thanks, Maxime