From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91F52A04AF; Mon, 4 May 2020 04:20:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D15441D41D; Mon, 4 May 2020 04:20:38 +0200 (CEST) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id D32331D183; Mon, 4 May 2020 04:20:36 +0200 (CEST) Received: by mail-io1-f68.google.com with SMTP id k18so10780362ion.0; Sun, 03 May 2020 19:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K5R05Sn7z5EwOn9SkZMzbYmwcGGX+1uymla8H1+XADc=; b=FQX+DiTQarZAjQPkAo1d36FeavBOGHT5L6ywcp3FyqLt0UnyCdMq0g/4waspW893sF Y9NPPXAF3xQEzg10NOo+y64tmtX97yw1M/X5fPQi9wEoQGuZPMRT5qk7PdV8nclgN4d2 NXMSzS88stvG1hSuFIhhsaOmWxdbX0gucaBaZjdZt6NwrtZBD5Nx2M1IS3x1L4kjEUpI JErrb4rh7tY7ZzrnPl0cgSdjV6lw9vUfOglSk8cJxQ7tyEJuDgy3J40tDbEbILoYDpmx 7XNyMS2nzQ8nfVbRH3xBi9IPV6gj/AY7JyW+Wm5zGIOO25RzbBIl2riRgza/5lUJAfQB CcHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K5R05Sn7z5EwOn9SkZMzbYmwcGGX+1uymla8H1+XADc=; b=YCyB+pglIUhejMWIP6/MhuKOkRMPEhJxCZn29SaFtZByQHyW8s+Hlz7g+f46EYNJ35 lM9LH8bu+Vo5LHjx7C1Z5bSzqw00dvJ0IQuGk3LO1pZczQObeezSRAxNKAfZT/3eh4Pt mkDbOnhL+GXGSavAbjjc6j6Go/ghAoZq9QsJlcAIYc2UO5QGf6jOuZLLlhlwh97COOLj pyI83AJehWOsc1abEi+QcvL+6J/bxHgkUWS1fOIcT2kMf2A2yHBLddAAAtDb0MmHm+Vs od0d7hj23PXLbI8xCD9hXkk/FhE5avG3D5wNq2lIgbToOZe9QmIyT6bkLxIfAqQ6+6UC 3+Bg== X-Gm-Message-State: AGi0PuYg+b/UBemIyV6Pen4W0JwPxOJpxW8+0BiHlDjrUYgbMOwEwDDK +h8A+acd6WmR0BV2Eqit6dpA3pYU0uOuU5Sdaho= X-Google-Smtp-Source: APiQypL4H9sGzLT0mGcUNpYcL75CHtDMpNi/HRAB+d0VZuvHG1ZbIhHX0inQP2dy1cBlB8CrYTmwULIxT/O+qoq0isE= X-Received: by 2002:a5d:8c89:: with SMTP id g9mr13598400ion.1.1588558835985; Sun, 03 May 2020 19:20:35 -0700 (PDT) MIME-Version: 1.0 References: <1586259343-6272-1-git-send-email-wangyunjian@huawei.com> <20200408124922.GA4852@outlook.office365.com> In-Reply-To: <20200408124922.GA4852@outlook.office365.com> From: Jerin Jacob Date: Mon, 4 May 2020 07:50:19 +0530 Message-ID: To: Harman Kalra Cc: wangyunjian , dpdk-dev , "Lilijun (Jerry)" , xudingke , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [EXT] [PATCH v1] net/octeontx: fix dangling pointer on failure 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 Wed, Apr 8, 2020 at 6:19 PM Harman Kalra wrote: > > On Tue, Apr 07, 2020 at 07:35:43PM +0800, wangyunjian wrote: > > External Email > > > > ---------------------------------------------------------------------- > > From: Yunjian Wang > > > > When octeontx_create() is cleaning up, it does not correctly set > > the mac_addrs variable to NULL, which will lead to a double free. > > > > Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table") > > CC: stable@dpdk.org > > > > Signed-off-by: Yunjian Wang > > Thanks for fixing. > Acked-by: Harman Kalra Applied to dpdk-next-net-mrvl/master. Thanks > > > --- > > drivers/net/octeontx/octeontx_ethdev.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c > > index e8aa4ec78..437abd7e5 100644 > > --- a/drivers/net/octeontx/octeontx_ethdev.c > > +++ b/drivers/net/octeontx/octeontx_ethdev.c > > @@ -1181,6 +1181,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, > > > > free_mac_addrs: > > rte_free(data->mac_addrs); > > + data->mac_addrs = NULL; > > err: > > if (nic) > > octeontx_port_close(nic); > > -- > > 2.19.1 > > > >