From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20067.outbound.protection.outlook.com [40.107.2.67]) by dpdk.org (Postfix) with ESMTP id 8A7E05B16; Tue, 8 May 2018 21:09:02 +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=ox3i2dEfMusO/BL2GrAGx0+UUkL1VWY3nfOKws6fw2k=; b=mWNZAZSA2Q4BQicmd5XKcHCgIn+eJ0JeWIPzOzx1SpTzErAumYoG64/ysL81muhurRpsufYsYGZc+ew6Oxk6z6J+AloeFzvptiyIzz3+xQtZtelN8xUmmwCNm7GWVXJ1umzABiCQYgBYLfnSqNIilFC17TR0e9f3w/19Rkuh9tg= Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com (10.167.195.147) by VI1PR0501MB2734.eurprd05.prod.outlook.com (10.172.11.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.17; Tue, 8 May 2018 19:08:58 +0000 Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::11b2:1e2d:709c:695d]) by VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::11b2:1e2d:709c:695d%13]) with mapi id 15.20.0735.019; Tue, 8 May 2018 19:08:58 +0000 From: Yongseok Koh To: Raslan Darawsheh CC: Shahaf Shuler , "dev@dpdk.org" , Thomas Monjalon , Ophir Munk , "stable@dpdk.org" Thread-Topic: [PATCH v3 1/2] net/mlx5: fix double free on error handling Thread-Index: AQHT5qyWKdwVUE6duU23agVAvEwRT6QmMq2A Date: Tue, 8 May 2018 19:08:58 +0000 Message-ID: <7B4B0BF5-57AF-4F4C-BAC8-31F875D0EDE8@mellanox.com> References: <1525770687-22980-1-git-send-email-rasland@mellanox.com> In-Reply-To: <1525770687-22980-1-git-send-email-rasland@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2734; 7:tSPkIIwHM4xrFX5KCLasWE8GE3sy2SKdJAAvt92It6MmIv2yq4MEpKuAkLcL8RsrZeuA7PGvnbT3DL4HuUQ/sfPzb0VMPVwAV9dpkurvyPJ91gHMIHcAODLsjvmm6za6l2EWU4zR7rlQ6+pDpaH3k3L0WLiShWVPZlfL/gkocaJ5u3cU5yCzX+inWtZkFXFx78x3w9y3z6NcEiRw0Bp46Vo3XIsh9yADrqvSXxgDt2sZT/KbingL0z58tE/0AZ9i x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2734; x-ms-traffictypediagnostic: VI1PR0501MB2734: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: 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)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR0501MB2734; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2734; x-forefront-prvs: 0666E15D35 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(39860400002)(39380400002)(199004)(189003)(33656002)(66066001)(6636002)(316002)(4326008)(3280700002)(86362001)(476003)(3660700001)(68736007)(37006003)(25786009)(82746002)(2900100001)(105586002)(2616005)(6116002)(54906003)(97736004)(36756003)(486006)(106356001)(3846002)(7736002)(81166006)(6486002)(6512007)(478600001)(5250100002)(5660300001)(6436002)(8936002)(102836004)(229853002)(8676002)(305945005)(446003)(76176011)(99286004)(6862004)(11346002)(14454004)(6506007)(26005)(81156014)(53546011)(2906002)(83716003)(53936002)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2734; H:VI1PR0501MB2045.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:3; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: nc4hOSLnmy3/QhuROcAQxJavhdLZl89jg7o+tFMcyVxwW/2ohtE4ZK1VW5yKFcAZWJ82NpGi06NT+xsTPIUxwNxRam3oxgbWd0piR++4Xo9DtiWNvHxGXISQbkQYj6KxgHad0FT8kFW6viMtxwJb//vRBaEK8VznCNjPW1/PDrqL9olM1ukynBM7Nn6Fcycw spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 4df9e83d-779b-4824-720d-08d5b51726e4 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4df9e83d-779b-4824-720d-08d5b51726e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2018 19:08:58.2767 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2734 Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/mlx5: fix double free on error handling 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: , X-List-Received-Date: Tue, 08 May 2018 19:09:02 -0000 > On May 8, 2018, at 2:11 AM, Raslan Darawsheh wrote= : >=20 > When attr_ctx is NULL it will attempt to free the list of devices twice. > Avoid double freeing the list by directly going to error handling. >=20 > Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 = adapters") > Cc: stable@dpdk.org >=20 > Signed-off-by: Raslan Darawsheh Acked-by: Yongseok Koh =20 Thanks=