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 7DD37A0597; Wed, 8 Apr 2020 14:49:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F17291C1A1; Wed, 8 Apr 2020 14:49:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id CCB4D1C11A; Wed, 8 Apr 2020 14:49:42 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 038Cj7K5014148; Wed, 8 Apr 2020 05:49:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=piBHNSa0ss5wleDBdrA0vCvAQf6nSOvVpzb3mM4ARek=; b=GUTtgOAtrh9kD8n1NtTnc/fZRyHRqOR2FsFF9SSIuoc2Y+3q3Ra47IS7prpnEPZY9a0t Suw4t9kgl7dnC9faWBddZKXBHXn/+IJ0PfPSw0uLED/sXbE5SwVglQ7N+3Azr2v2DlyD s6STZspkVlADN17X/y2Gl7s1teSsfOlF94JSyRRuSHdyVkW8UhOzrvtUwwZRsJjbL6/y tN2CETHLedSUXYBiYpRtFEXCqAOI1JX3GBxH2f1//44PLSWrj7JAdcZu5XIoVNbem2yw RrOakj8ha48qxanzaYFdixLDshUM+q/YEGMX+kdH65ZZavnOd4Chse4iwACzQONijCiE vg== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3091jwb7kd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 08 Apr 2020 05:49:41 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Apr 2020 05:49:40 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 8 Apr 2020 05:49:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bpdhUei331ddkM2F9RB2sGURzSKGtWmvTtJVXbumvHUtJlq5LblmTx23BfJEOkgaizBbFyX0cWpHpQbAGfOJ0eNz74OmZA1euFZ/vDCYy1zlDzi8MdJfaEi6VszBhWo8YoLhyCTT1/HVmQp+uNORLIQWDMzo9ey7ElawvZWo91BiiBWjUJyZPqIIumuaPlotvnVxJs8VCzL8/q7JLxw50WjPbcSYZlL3+bsY37c/41NdqYmvSztl5e+/+gdHO8WG/Gisn9kvwPS+AcefJlbvX/s3nRSrPJpZZVi2BBC+NXKq269SJMFR2WsQPya8gWt2Wy9k9IEh+cDaIhzLOiaN4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=piBHNSa0ss5wleDBdrA0vCvAQf6nSOvVpzb3mM4ARek=; b=AG1ObxbkhVtb52jeqnpaeUoGqC5gt+XrwTemtIvRfnTqHuxa9dhQlWZMIv+bTglfymtH2GQK3HCqckVxE/W4ppFb1BQYdSrIMMHotAyL9EzIpCGTrAuwmIjPRBOl1jEg9qY05ciPlOAIW2fMitI3QYsapX5LMlfXA/7OD3qb6lvbXrxtIAWcI0oQoNsC5ars+/x212J3SIy366gFUX0WHJoi1NZ8yXmZTEwoOLE0xB9tvQmMWgGJYhArSj60O0SpXoTZnvcqeyuOQ3W06KNdaHv5QEY2vVtFae3PLAMLSusExFPtFDUQ45L/xeliYjRxvlkq4A6uJStXvbhG1P+/MQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=piBHNSa0ss5wleDBdrA0vCvAQf6nSOvVpzb3mM4ARek=; b=YCXkoLBvShUFyT0OQmgmQ7LGOM1hpmg/mN7OzwpzyFGVHut4Py7iN6QJhmaZZsBkmy4HPRGWe5cGwQcPCh98qBJzVMfTX8wvviIWRqYXTr0ZZmVqiCqrc0KU69i/GbYRLTkBHZH4pCmuSwKK0G+CqGNM8nwAztMjgwinolb84EI= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) by MN2PR18MB3575.namprd18.prod.outlook.com (2603:10b6:208:26f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Wed, 8 Apr 2020 12:49:39 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::a8b1:45c4:b84:9c02]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::a8b1:45c4:b84:9c02%7]) with mapi id 15.20.2900.015; Wed, 8 Apr 2020 12:49:39 +0000 Date: Wed, 8 Apr 2020 18:19:23 +0530 From: Harman Kalra To: wangyunjian CC: , , , Message-ID: <20200408124922.GA4852@outlook.office365.com> References: <1586259343-6272-1-git-send-email-wangyunjian@huawei.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1586259343-6272-1-git-send-email-wangyunjian@huawei.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-ClientProxiedBy: BM1PR01CA0100.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::16) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by BM1PR01CA0100.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Wed, 8 Apr 2020 12:49:37 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3d936178-d852-4049-fff2-08d7dbbb4d12 X-MS-TrafficTypeDiagnostic: MN2PR18MB3575: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR18MB2848.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(376002)(396003)(346002)(136003)(366004)(39860400002)(1076003)(66946007)(6666004)(316002)(2906002)(66556008)(66476007)(6916009)(86362001)(7696005)(52116002)(81166007)(55016002)(6506007)(33656002)(55236004)(8676002)(478600001)(4326008)(81156014)(9686003)(16526019)(26005)(5660300002)(186003)(956004)(8936002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l0NEr8YbasJRY5hJQYlhzbP8sskXOL2Q5IXBob5ppDz8HxFdQdmZypWBmMI57vKQrY5rd5hI8GtjHMkPUx5Ucd7MDOTnGCYYrd2bkRoefJJ1zQWVW/a3L1b/emTUuOxv6RS8Bmtex31+pfUED35X+k1ri3LldpqZomVjmLBzKR7rrAy+wGYF+4mnWyMkNZg4d7GliRdLITiEJC1ZYKprReFgG4tX+QXlAqyBwHjE2Rtdb5sLLGZ0im4VKOI/uTdCFuUD0b/dOagBQWtw+V5MFicjqs/qu44VDSeqAD4TTo2+Vmykfo8ggp6aAaLujLRyOywBobPMxbwlwgaL1shZlQO9VrSu6SRgDeAyb7v2LG2qqsd2SONsfPQzZ0BiVUL5fuWijztVub/hJkcwuoIj6Dcpb7SzHwVjAb+iNVffjaYBdhM9s1zSCNiv2Ur1Ud4/ X-MS-Exchange-AntiSpam-MessageData: OVYZq2s/RNWZgD/5aQFk+ePr+gfZil2avYABY/5hZ4QA+qc5eRNwTZYEEOzucIoj2ocF7JWlKVl8+vkvOeOkCk+Stjp0JZ7ZZ7wOzfmN9s9JJzThjUV1tmpG7JbMZcFsnOye4YRYa04Ao1zEK04QkA== X-MS-Exchange-CrossTenant-Network-Message-Id: 3d936178-d852-4049-fff2-08d7dbbb4d12 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 12:49:39.8220 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K0ExHE6QmXmYkBCMP/kfDlySSLNwedRPZIGjRYtoDXw02uEUlYWvDRiP5Tu9f5elxq1hpvNFVyyotg8fR0kpjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3575 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-07_10:2020-04-07, 2020-04-07 signatures=0 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 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 > --- > 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 > >