From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93D95A0548 for ; Wed, 29 Sep 2021 09:55:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87830410EE; Wed, 29 Sep 2021 09:55:18 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2085.outbound.protection.outlook.com [40.107.93.85]) by mails.dpdk.org (Postfix) with ESMTP id 9B0A440E3C; Wed, 29 Sep 2021 09:55:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GSpA6At7C74kjlO8PZMTjfRngxkLWIFvLO8/0uxriunVquG38QJrdg7qWjsb1JC9fAf2+IJN509hoAxI+jh4VBj2uYTb1NqvMzRuy7Ncfqc2ZTVmyASAip7WVfdErY8MFpzva/wJ3FuSjImHgMlBWexr6OeEBUELnQdtUOS8qSA1WcpM6UZ5ntp3+JrhBTfbd4Xy9E2ycjWbHwG2xjUxHZng+tZq3SPku9CFZXJ4+MxhvIjfi5TTN0XFYtQduaoeQRfAtiip7TX+2IFcOKAat0o2xShKG5/ijz20luOTCgTM3+ujvNZkhDpWoCXTvWYcteSWpkjhVv62HIV2j01KPQ== 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; bh=754X/+MEX2VF/sR7BiRFOAyxXIjeIzm/wMGsA6HRC6Y=; b=nHJCKk+EJjo+RfUN/u4HFpbjhP3M3Cu1hKimr751ShfjPYFvM2yYrc7lDkGUqrsBX970Ws1LqQJhblrBmyIAe4KBGZ/NpPGfxkT6PJgdtIlege+FtgdameXKFc+1j+c2nIJwYK1UipNb+zz7tXdDlQ8dR6MALlGZHsQ11PBGIz6iIy8jI3LLMesXSBfOCzpC8oK2yNTrzdA+8ltLvwHab4o5LKHXJNSORFih/JDYt5kEz87SyRVdMe1PKViFqbmSEWlj+4A+UDWmAlRJlqMGPSV9QhuT9bhm8x+y3zBLLG52yfeoXTEX7JTaadAwlTS3gr+Hpd37BRxo7BGeR7B3Og== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=754X/+MEX2VF/sR7BiRFOAyxXIjeIzm/wMGsA6HRC6Y=; b=uPkkl6JEKdKc7KUiJqrT/Z1Mjvgz9t1z3zXmFf3ZVmmNggE0NBbzjsNf0v28NYT1jOlF2SE2ASLWbH2UsG7g+X3p9+1IT5GAUgswwovR3HeGFe0FMsGA3DbYi0lZeSuqY/FDx9y4oQuMx+A+WrV3w7ncm8/pkHxXQSlcAaIl1RNxqsFL2kd3XeSH6cYk0VJdux/21Sxz8CfLta3MPk2cUUh1GuM/11CtEjMw/xahL4qr0zN89WxaiUr3jbZy1/BveVECfyvFRUtE3vYAz6Qp/3tkbdCNmrozxYh9pEFGm42ecgrTqXwtuNMrI5Un5N8mIBpebjFcbCCBElz9E2RtWw== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM8PR12MB5432.namprd12.prod.outlook.com (2603:10b6:8:32::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Wed, 29 Sep 2021 07:55:15 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::45be:2914:19ef:f4bb]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::45be:2914:19ef:f4bb%3]) with mapi id 15.20.4566.015; Wed, 29 Sep 2021 07:55:15 +0000 From: Matan Azrad To: Bing Zhao , Slava Ovsiienko CC: "dev@dpdk.org" , Raslan Darawsheh , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix flow tables double release Thread-Index: AQHXtB6WfSWhTkx4EkqHJuj1l7Mjl6u6pkSQ Date: Wed, 29 Sep 2021 07:55:15 +0000 Message-ID: References: <20210928040851.56636-1-bingz@nvidia.com> In-Reply-To: <20210928040851.56636-1-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d669384b-e51a-4f7e-1958-08d9831e7934 x-ms-traffictypediagnostic: DM8PR12MB5432: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8U8gL4LShTg0xpztj5UJvz/YKgu4yBm/nhLwGGuN39BD8JgZVcIekd6IbfdGqewoQ1ZNmXzA8htjwZqkuju4JGo+tlZ0WnFzkNenqykL5Np4R9IAuYNajO0Suw1ke1Vq98G30YNgwZ7P0o68rn3HiDhRvJvl9rNY1AHo7NfaJVU7f4YJdJGU7+q7ctYVElQ9E2ADCLI9BFVqHSE4jq/3/LiGy1DrafGYnPgswg5apzFQLCBx4bRF1EG5JGK//SCa6LeYLSXra8S/iSbXqRDBG/fYJFTzaVusHpC2ve7inZsDcz2vLAmWqG69tQiqVOJBE0bnjrLkt/kLTt5JCTIG6j6Y2WVFXGYMd92zLtdOWO5IyduVb3E3QhmFhKxTggx5b7AXqYc+3cajzerpBBTapje7odsSy7PLYwvRSf+ZvfYCfRSBgTxxGtBQx002X+wrOp4E4+L8HQtmGsf2bLmDProZWVXm5qIvjd5RBKjKxkaccPAsgnqqKJHDZB87trCZHwU/p6TTAH/CYVvA2eAL7azkVQ/9vNPPJJfBBfI+ZeU3Em7072z21NFP8FNZiXfszBWLfC6mGdaN/Cc903nQ0AuLYKEriPcniVnBK6/HYqKsZfOkoHjULXWZkG5XI0TY0fyLp3xmeXdjZM2GLKkQqRHPG8V9o0OUQp0m9qRMzrsmnSbhI1rzLhTW1oQno5Hz6A2q5Aqg/g5BisSTl2CZRg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(316002)(5660300002)(52536014)(4744005)(86362001)(54906003)(110136005)(38100700002)(122000001)(450100002)(38070700005)(64756008)(66556008)(76116006)(186003)(8676002)(26005)(6636002)(7696005)(83380400001)(2906002)(55016002)(66946007)(9686003)(33656002)(8936002)(6506007)(4326008)(508600001)(66476007)(71200400001)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?8FRUE6yP5j0DpDp7PG8zMdjN+JDmm20CWw1PmsnTx287tIKgOH3yryv3Dv2u?= =?us-ascii?Q?+cbp6e6krn3cqEqjHhU5l5lbISVaryBoYb1jKz5msTYA4pYTGFCfyLjvfbPb?= =?us-ascii?Q?NZnke0j3ofwbJYA7lUftlaF/yPNYhbeTO502vQiGBzI9m5gubtyZlLTNDnlD?= =?us-ascii?Q?4RZe7sNE4hFGh/TKrVkWscJCHF7MM6Pd1BKBVKsuaDc3jpoQ8NTFBy25E2CX?= =?us-ascii?Q?Q7nATuTxVbsTOTU5azaZkEugCsL+2kww1PTBSx3sDvEgpfQHtnt5EtD8TSyu?= =?us-ascii?Q?eN2b5LIm+lorPVhXCYFicrNkxDIRTWRzegUAU3skFZSXYxJvhNhtJXZuUgBd?= =?us-ascii?Q?CEc9wEawMrdc62Qxo3bx0F8XUG0AOXIMp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PH9fVykbiCN4TXh8Lg3eoI+X1zVwLbLvIY4DNBJfz/FtyurM8e?= =?us-ascii?Q?7OjT7veop6P99SHL29YFCFaW?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d669384b-e51a-4f7e-1958-08d9831e7934 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2021 07:55:15.3688 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: UjHCoaAE2UgDefBN2XdaRAwtY1KuKx9jCtqxWPADA9IRzGatp2/YNeD9Zu6dGfWE19FMdj3/QL8CFk2MysjmzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5432 Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix flow tables double release X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Bing Zhao > In the function mlx5_alloc_shared_dr(), there are various reasons to resu= lt in > a failure and error clean up process. While in the caller of mlx5_dev_spa= wn(), > once there is a error occurring after the mlx5_alloc_shared_dr(), the > mlx5_os_free_shared_dr() is called to release all the resources. >=20 > To prevent a double release, the pointers of the resources should be > checked before the releasing and set to NULL after done. >=20 > In the mlx5_free_table_hash_list(), after the releasing, the pointer was > missed to set to NULL and a double release may cause a crash. >=20 > By setting the tables pointer to NULL as done for other resources, the do= uble > release and crash could be solved. >=20 > Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion") > Cc: matan@mellanox.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Bing Zhao Acked-by: Matan Azrad