Message ID | 1525881216-3130-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 3AA3B7EEF; Wed, 9 May 2018 17:53:53 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00072.outbound.protection.outlook.com [40.107.0.72]) by dpdk.org (Postfix) with ESMTP id E4D057CC5; Wed, 9 May 2018 17:53:51 +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=4tUwKwImStsFQEpdqqmSt1x15apRnnBtEnAgz/i3aHo=; b=HFzdXpI+w/0naGT3rj1mXRmgpwOM90AoP+pw7jFozjqt2Y2QnOk6l09Bz2FkRuqKo1GRUIS9Y/Qd6h7jwOCPcFZKGU7A10TPpgoV0ZtE2ilZsct82EeqoHS6Ac3osBjl8jccjE3G2S3sPzzDWChVmP2i265U1r315qZgfNszgYY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM3PR05MB1250.eurprd05.prod.outlook.com (2a01:111:e400:586f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.755.16; Wed, 9 May 2018 15:53:49 +0000 From: Raslan Darawsheh <rasland@mellanox.com> To: gaetan.rivet@6wind.com Cc: dev@dpdk.org, matan@mellanox.com, thomas@monjalon.net, ophirmu@mellanox.com, rasland@mellanox.com, stable@dpdk.org Date: Wed, 9 May 2018 18:53:36 +0300 Message-Id: <1525881216-3130-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: VI1PR02CA0052.eurprd02.prod.outlook.com (2603:10a6:802:14::23) To AM3PR05MB1250.eurprd05.prod.outlook.com (2a01:111:e400:586f::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM3PR05MB1250; X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1250; 3:Yl01Ox6ZQwQ2IgoagIdsA6YWxb5FimDHDUxii2nFeRYuRiVrAkpZoGZLRSGi0LW/yCHEpoyFXHvfEzmQSvmn7o5CBGV6qS5wcHxJlksbum4XzYu/JyUjvxYrLXmuOt4/ft5UQpGVV0i0DBpuITOgd3ya/fN19APDt531Nb1lZ4PqxlcunPEPRLfU8oZkuVR+xVFNlmUnVBgg+Yh4O8ZKrydWy3fsLuMAFx55zG1C9vFzsTCurO3vbC4uUhaAlnVF; 25:fV8p5fTgxyemxAmjvq2JSTqTIkBIkzqIu6JeHoitIKIZP+m9HAHGE5eFOsLn4jSluYh24rQyh+j8m37rzRdVeyXg1ZMK3K80VbInsXy/46NfUDx4Bw6dvyF3zzzh2M20SWI9suScvJb093XkG3avGYaqD8O9CjUSPlS93b3X7rzj73yy8G0xxtwvv6g7Q6DKXiYhYHNDqaNP/EFndA0DyEC3+ElSTdL7T3WV8B9WtjtAd3N+qTt1pks7cOXSgllMWHN105tqOu8M82OiTo1YmVYZtiiKOh4+nv50vWj/3M1wisLaDQEatCDYBAU2n3dDzSeokK03b5LKo/MEveXZhg==; 31:OD2spKa4LUAuSh88nRMw+ZeKY45LiG1lK9pZZI9lFbBChYuWbNkF/Wko46zmTGi/DgTcx5kUOqIwcPqkKeWZZ+MJAT7K1yBq5YHz2rgkCL7OC0vkINXn7kZY/9b96P1RVODCZjO/eGg2dr4iIyKCSjfXf7/PDbAsfFTGIyh7n2Rr69NuVHeuZc5eFbJYEa2qq21Zt62BoIpYCg0fXXQkC8sqy3H/TpB8JxBqKr3W2Ho= X-MS-TrafficTypeDiagnostic: AM3PR05MB1250: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1250; 20:y5V0o5RZTlElYWvPnDOtTed/YV3Efil3hx9tcDvGGuN5NwnlTi/ZRmffDLN/LFtLimhEeWsZ51RZmHIHZPwrFKzg4Vv9leZAxZsSq4PYXHhl4md+sU0asFeqWmJ9jioH37KwAAnwDycdCtryKBOz0bOAKmRNfT9Zocdl9btgB4x95VR/fdNdiOugRf75qt5Q9nA7wMsbFMVRu6S0FJnOUceox5YUwBZSamd211obTN26Bvx1+fCu0/UOEnoEtvbeV19zz+qDe+R7+lur10CgWJ4r8z3QHyh0cHae2WH2Z5ob6wRGvO846gkK05tV75ycwIdLvehl9yMLriP/FQ5uI2XnPvAxZ2aj2c/xU96CUk34J120NDmoSkFuIUMJXoZh6xrYMrMfd+qk94VXt8qvzOGxJIpPYUWjWUIK6giRN7Nde4V/96VptAuqs2LgClaJMO0aDmVoxmvAH+PpuOTH89mufSaNZ1wmEkttnPeaZIPsVLtyfywnMM+iKOoQ/XcS; 4:915EK2LLq90v2ics13ggij2b2PPiwP22z0a8LKHC4WTX0wRoBVCETx7adxZBHAMc8rcLDSX/keoimkUK13H4JaCoyfsGXBIYzcdt0vlUCrvLEyYuEsH3feQy3yidHLp3Xk8H8VeEdQYo789v+0MK/1AX/x6NZOXcD+hpxUa2L3IzjPn62gnAVP4lpOW5D8tEnzY9aZU39WYcFoVrDOPK8LUVR77ksy6iBy77Cexkkfv/0KXXzLi3n16XNxgt2tzMEXVZn/O58Mm+WhBZ94xOwA== X-Microsoft-Antispam-PRVS: <AM3PR05MB12501D9617307164BCAB237DC2990@AM3PR05MB1250.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)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:AM3PR05MB1250; BCL:0; PCL:0; RULEID:; SRVR:AM3PR05MB1250; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(39860400002)(376002)(346002)(366004)(199004)(189003)(956004)(86362001)(16526019)(2361001)(2351001)(6916009)(26005)(6666003)(69596002)(48376002)(7696005)(36756003)(186003)(4326008)(51416003)(106356001)(25786009)(55016002)(105586002)(50466002)(47776003)(21086003)(97736004)(81156014)(66066001)(2906002)(8936002)(5660300001)(81166006)(7736002)(305945005)(478600001)(316002)(16586007)(52116002)(33026002)(59450400001)(3846002)(386003)(476003)(50226002)(486006)(6116002)(2616005)(53936002)(8676002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR05MB1250; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM3PR05MB1250; 23:+Tbm0jBXaqmYfXz8yWPr11Z1MLnMkpcw+ub+S5JgU?= IndR4bIo/Daiz18zb0YLWf586/Uwl+Y7lmQrV8bMMPkzeA2aEyrfcuu07Twey88r0VHiD1ZbCB5yuUNHu18p/9pliqsWeY36rStN1+t7mOCJkqa6NlF7KDgL0hjLNdO41LkZRVCj2EC0bxlqRYrBoYCty1ZYoXOmA2bFQtRYC9u9Iwx8Meo98ArO2OpEJ/njJf/A3+CpErNjdG6QB6m/pIC2vmk2f515VkmU9g8AzuS9eWrh8e1CKY4ZrXazt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E0h6wgIoLut+HoMaP6ZsqvH5qO9BucNwBzILvy5uAcWeflg0qHkNmaXsD326aWb2ovsVlUad+yiGccU X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1250; 6:C4uhEZHleT+X35n6xnfIXJyxhf06JtvvoY/1l6ntKTC3L+NHa6/g1EocyIPxsGmTUFEa3ujnvIjPmRHsbCRccWscnPo4D2GWA3sxusyzGQZaIKsuPvcQCsoEuAWJDD137Qh1aw09+UM/to3yzNxK9PE8/Wl8oGU9XeIiy0OrtZROWuSJsE2tb2eqrO1dxiAA62+1jbr7UuTOMWxDM1U5WEj9EyHPpH3Ibv1SmTGLmj3fTfg0VzXGorW013g3A7rnG585TQRALz4EQp3XkW0qTWJ5G/pTUwcsvNX1fbZ1Or3Oohy1K9VJuN1QjIt9uNBIXSzNclDyHWUG2lUjOXTm1eD7W0g+fftPUzljlx/5rlnhpDQjhdeew4nOCNJaLfAos63RGOSSy/ezR6hYlVvnTLh5HQZm9574851fLyb6GXNik5rZTZYaD4xe9xzGY5tnbrgC0U0Gol8186ECUlJiEw==; 5:s84Izs7ELCSYctMmvZ8xZJnGcL2vHDol8sjW4A8C47Ak8UPwQUGiy453LVBWBrdpghZS8OhjZBB13PUhIXwaMmfZ/JlHe0f5thtwk8wDLifsNvlNMTsQSszhNNODs21wOg4wuOpkg9LZZr2XujG02LRM8wq/LJwMmsqVR23bwfU=; 24:bT2YRQBVg7pvOFcs9EIdV+GyOEWaMqQp128iPY04dExgjNxnlwFa5DB15V0qJwmF7YPZeL3dRN2ooc3lgxTR1/rqruHZUN3jD3UFQIWiFgY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1250; 7:G3Dabxqg32fo72K+i761DOTsy889poLUphc/z85XDK4Kje4g7DB+khBKAsV76jewZsU4kRgUorIsQ2X2IHD/GbJQcLXXxYK69IjRN2VMS/mbkbGfxc/FHrkAeblV6gjcLExNTO60wDcg2vCbU9k6zPnpX+SZRHqRKe10zkTBUoiAFiInkaMVXfnoVwxD66Ty0F16msn+T+E3jiJQkKD8ouwJ9oTYQAVtjJu3JOR6iy/dV472WuMYVP3uxPImjrKx X-MS-Office365-Filtering-Correlation-Id: bc28398c-2234-462b-b411-08d5b5c50eb1 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 15:53:49.0625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc28398c-2234-462b-b411-08d5b5c50eb1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR05MB1250 Subject: [dpdk-dev] [PATCH v3] net/failsafe: fix probe cleanup 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 9, 2018, 3:53 p.m. UTC
The hot-plug alarm mechanism is responsible to practically execute both
plug in and out operations. It periodically tries to detect missed
sub-devices to be reconfigured and clean the resources of the removed
sub-devices.
The hot-plug alarm is started by the failsafe probe function, and it's
wrongly not stopped if failsafe instance got an error. for example
when starting failsafe with a MAC option, and giving it an invalid MAC
address this will lead to a NULL pointer for the dev private field. Then
when the hotplug alarm is called it will try to access this pointer,
which will lead to a segmentation fault.
Uninstall the hot-plug alarm in case of error in probe function.
Fixes: ebea83f8 ("net/failsafe: add plug-in support")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
v2 changes:
Reword the commit log.
v3 changes:
Reword the commit log.
v4 changes:
Fix the fixes commit sha and title.
---
---
drivers/net/failsafe/failsafe.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index 5e7a8ba..3a747c2 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -226,7 +226,7 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) mac); if (ret) { ERROR("Failed to set default MAC address"); - goto free_args; + goto cancel_alarm; } } } else { @@ -260,6 +260,8 @@ fs_eth_dev_create(struct rte_vdev_device *vdev) .type = RTE_INTR_HANDLE_EXT, }; return 0; +cancel_alarm: + failsafe_hotplug_alarm_cancel(dev); free_args: failsafe_args_free(dev); free_subs: