Message ID | 1525695534-15072-1-git-send-email-rasland@mellanox.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6EEC2D13; Mon, 7 May 2018 14:19:11 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0060.outbound.protection.outlook.com [104.47.0.60]) by dpdk.org (Postfix) with ESMTP id 269832C72; Mon, 7 May 2018 14:19:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QSpRWXTWVYTtBMZDlFGgqKYSwHV1fY7rIk6APoRRy1g=; b=dWd9YUwwmk5/kdo5rNlWl+IfuN34eqeWdbW95ltt5ej4snuR2B8EqUdD3oXsKVkIMf67NIhx7hbF0MqDNp7n3f2na+yJEu+SKj8Psxckh2c04ETf6RgmsGPr45kRQxKI/XKxmcy3CmgEvPLq6zRKkpM9DuSWV3BvPRMzHPM4jdM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM3PR05MB1249.eurprd05.prod.outlook.com (2a01:111:e400:586e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.735.16; Mon, 7 May 2018 12:19:07 +0000 From: Raslan Darawsheh <rasland@mellanox.com> To: shahafs@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, ophirmu@mellanox.com, rasland@mellanox.com, stable@dpdk.org Date: Mon, 7 May 2018 15:18:53 +0300 Message-Id: <1525695534-15072-1-git-send-email-rasland@mellanox.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1PR07CA0021.eurprd07.prod.outlook.com (2603:10a6:7:67::31) To AM3PR05MB1249.eurprd05.prod.outlook.com (2a01:111:e400:586e::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM3PR05MB1249; X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1249; 3:aU6pNaZe8LCqKGUFbr+GG3+uMEcHM6jx5QOnFwgAVOfdR7L2v/Scmopce/EgvlzIzSXLqi2M3Zd5vAVIqtLF/y8uRZAYtpeOXTB/KzwquQvQIK3vC7UFR4DF5ubFPWOTDDLTn2cNeSVwxOAWvROIo//aAmxOwv9hM8rwsuTYYEahTco1Ra3p78bG/HfJDie5Fn7jVYFOvQeYoaZeL4lEY3fHzc9X6ROsBoIawmB+m6nbfcJIRpE4Z+Wq5U4pAA+g; 25:Xwmd2+siJAYx6sVQ8+GjMygVpyQehPF6yUMXfLEtmzkewxg5g0ctSLFmpT/2Hcz5vvY0m4Kk6g4QxfzS+hY8AmYeiXpM9pfbORS4NeuXm27R4rK8j+wJE4XeBCwVEvQytLWJTBlXV46RZAlft8VgHuQ8Spzid/edeoTKGjGOJCQyvh10iVKlKF0pnf19SrJHymtFGP3zvCKFP7M//a0clKsAhpm8KAbFzT3+3IeHs3xWSbPNj76DvPiymde4uN2PGzpe/1qvjlMGKpghLYrYo3Y3yhO49OqVVIc38T6vRP+ZhqM0k7/4l716BEOWmJ07URGn6rQhWJi7rym5YmuQRA==; 31:dm3MU37UUOjedj4Z6Dj61WzLfC1qOZLDyPQRaYhZDjF9IPkYGbrwVhOvnjA1MqZipnvPzmv64T6gezuX6lsI/jOVKNLfl27AaCkirUCXUHG/O8CUpdu4IHwQZHGcLrTPfixpFvqbcvjb7z4ZUUuFDs3g7ayVH3AZNsASwi03yDuEE3GZG2m1pnFwjbAZtL2ADEn22J3Mcry/vT/OXMeNodWkAU6KOOFGGMSQUTN+cqs= X-MS-TrafficTypeDiagnostic: AM3PR05MB1249: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1249; 20:C/ZuwNmTXOmWLqmlVHDoQcmqFbFHllZ8hLnaoNpiF61z+lSKGH8eBz/LQc3R7mtrEHDXjNpo756eHAAJlCxi/qN+ofzUu004jMK4pUz90IJe/1M7szRhaqiEgZ0yZuOoCtGOaisFjQs3RJzFzb3xHrVZ4j2hWpSo1OiWpppbUxIfXivVdBqkIyVLxAwHRawDm4MN3ZO6Rnuz3D2DOCmmYlRBj+DTHyXdNjmUBzWaX6j0uJAKOH/xRJNqc+gPpKeZAjBwbU2GconGxTjQIlOHgXQxQNAd4uX5RIEmhq5yp67C5hDBdra+VXJC+3XLWHkaxo1qcyiq5qGwWAwgWVxD44mTGvUqG12wkyfPQVKak3rvxXbbx0Sp0kKLnVUMwCTyllnl1s6BXf3KkRVrBGCqu2NMxqCXCeMpZ9CsYM/LWu5eNcnCgs8lUyDYc5TDeHmMkJ+MmqxejYQTl7ju0y7hqvA3pbsjy14Luky3WNJ7eJlAjSFuyCfhIWxPF3YqxEbU; 4:lOviawgllHS6h6ODnMYxJuoI3xSERU1YxI05eZRPhJfxGp30swE2V8qHaBEPtZPp8sJzTFumv95Yeq0ITjOGgPAQNUwQytlUm3eO3lKGAAK4zyK2Iz1bfXORUMV2JMelkt1Xp8uyodM7DsKEwRuoBFDOlId1qa9HLbpRvHbu+BrVCRYmkoPKxZbeKtGvdVAHN6r+cszOcoQkDlpZ7ewA9DEB1IQy6GSvEH3gSbXgqnYhHXJPQvd7P+v5nfOe4c9GxySVXPmVz2buUhPtZ2cgVg== X-Microsoft-Antispam-PRVS: <AM3PR05MB1249C3BA0187C6466CA4A967C29B0@AM3PR05MB1249.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM3PR05MB1249; BCL:0; PCL:0; RULEID:; SRVR:AM3PR05MB1249; X-Forefront-PRVS: 066517B35B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(39380400002)(396003)(366004)(189003)(199004)(53936002)(48376002)(2351001)(2361001)(2906002)(105586002)(16526019)(68736007)(33026002)(4326008)(69596002)(21086003)(26005)(50466002)(86362001)(305945005)(5660300001)(7736002)(106356001)(16586007)(956004)(51416003)(478600001)(386003)(47776003)(59450400001)(8936002)(3846002)(25786009)(66066001)(316002)(50226002)(2616005)(36756003)(476003)(7696005)(52116002)(34206002)(81166006)(81156014)(55016002)(6116002)(97736004)(8676002)(37006003)(486006)(6666003)(6636002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR05MB1249; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM3PR05MB1249; 23:bbuv0SYetVGu766Yc6OAtfifozXtxm+RzTny3w7DS?= opm2fF6RIHYn+JsaKcCDX0EmOLuv28t0MdkQqAMJMNzAMIjdLb7aAniq4kpAE2NqGfgdxL67SC9jgLQLAJ3AHSm33XSdM9IcH6jS884LpKrD+yCmr/CzWlMgMMvWDmjyUNOjI/hRhZIHJ5aTABDYh/OdjbpY0bEdAFAvyzefNgEeRyGWTWhtgsk8WRWEmqJMwIsUArT9ZQ6CiSBVddwUi0byj/BSCQgmIwaG3yn9RIKnUOf36C/JsahZhMp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nuu0jorfuBzlRpbHgVqUxfvHdHZMAuRraLwl2km2an7/YhC3GRql3Tz0mbZWnOUnxorL8m/jjDXSGJv26iEtr3D4WNsCG8Xsbkot5MSO1prVXbSXrr7U/HUjPnZ34Hcg8aa4xmDww24vjFOZLLGqg4kO+HNqUMcQd4JEBupz49juGAfHXTyH+i X-MS-Office365-Filtering-Correlation-Id: 3014f35f-9829-415b-9f0c-08d5b414bba4 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2018 12:19:07.0646 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3014f35f-9829-415b-9f0c-08d5b414bba4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR05MB1249 Subject: [dpdk-dev] [PATCH 1/2] net/mlx5: fix multiple free issue when attr ctx is NULL X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Raslan Darawsheh
May 7, 2018, 12:18 p.m. UTC
When attr_ctx is NULL it will attempt to free the list of devices twice.
So, changing it to be freed in error handling only.
Fixes: 771fa900 ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
drivers/net/mlx5/mlx5.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 5190b9f..d34076b 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -690,7 +690,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, break; } if (attr_ctx == NULL) { - mlx5_glue->free_device_list(list); switch (err) { case 0: DRV_LOG(ERR, @@ -701,6 +700,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, DRV_LOG(ERR, "cannot use device, are drivers up to date?"); goto error; + default: + goto error; } } ibv_dev = list[i];