Message ID | 1525881254-3181-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 0BC477ED3; Wed, 9 May 2018 17:54:36 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0088.outbound.protection.outlook.com [104.47.2.88]) by dpdk.org (Postfix) with ESMTP id 7BFD67D00; Wed, 9 May 2018 17:54:34 +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=VI88jXpOyR02i0U9QgB802l81nPW862AFDuQlZI/vOkQF/y8o4JuLzyWV0iZqRP4I5RREuT7wOHmv6Zw69F9C3Et9UZLtSDmBh1nb2aMGqj5cjGOWEpsFljbbB/vLVitax2FH+W7hpWMbQ+ncJumR+qLwfa4KlZ+Davdmpn5/a0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR05MB1262.eurprd05.prod.outlook.com (2a01:111:e400:5188::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Wed, 9 May 2018 15:54:30 +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:54:14 +0300 Message-Id: <1525881254-3181-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: VI1PR0701CA0072.eurprd07.prod.outlook.com (2603:10a6:800:5f::34) To VI1PR05MB1262.eurprd05.prod.outlook.com (2a01:111:e400:5188::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB1262; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1262; 3:YQu0RjUdhTx8l0SX7Di2/eyvngwFAOBjDSHFGpdzi/cU55c0HetIkjJr4lGs83GdyySoKwHJooa7mNqFEVGZJXaO2YXfrcQlOkrbApHZ7QoqeZ8e0lEbevob545DoIC7INip5Kfvr7Td0dp9NDEpBrYWxMpcl+D6HbZnYCHVyMncp+RUgtoBBN4UyqJfM8OCzFiQP+QqrcjzGqsgZW5ALeYeq27r9QmAv/Wl+kbXNixNZHkS40McEDXhZv82NeGS; 25:M7iov/vgnRPoUt1I/UD9HjMiqMS/OuJvu69v1MXIMQ3mtKJxPmTeX4f5YuBVYq+gW12kghoBiUAwHixsO7q8s68v/0CxIHHL+a13g9KOldhSVekoN97NWduMNLukbFE99b9Sxiodmhb91eCdOROJuYJMrMrOCE/Y7G979gkfZeXzhYRhthmonHBMG5qKonjYkT4o1oDSXIV9aHTl79x0BOTzyI0gbAMsBxbb2ezStAJqYHKxyW+CUbllLI93oQjnFBmfzUFWIO4ac0B46aPTpbRFYGW4BEX4HzDcqdYy6W1ZZv0P6QgjvIlE245JbSCtV+3eb0GeWeNIR0mB+uL/HQ==; 31:fmgUiH0rCI2W05kphM3utww//BXWakuSFK2Q4BKywEp1by8TvX8PCnTKcUmYOShCM3VxgqTl49gg/Umohr1FiYruNuMXTSGCCBrAtLeOXINW7e/ZroAgM0W4+KUhYUa1cv//E5LGnWw0b/6yKS4WEaNW5VmR8kYCUf0+gvvh2ItdrVZJ4rab0fLRp4zpf4RQJeCffbCkYogRaSTnfoVUOiuCeR16IUPDAHFt0SprF9E= X-MS-TrafficTypeDiagnostic: VI1PR05MB1262: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1262; 20:CO/5zeRT2RSUJ6Po4KtJ0BaN/FP+8MuFoEDyJolcrpRe+c0GepVhzKjY4+NCCp31wcs6aJGQSBMzqGNJAkzw8XowmqP7gLa3IJ4xE/IK+r0KiN2rs7aC/fV+ocYEhiL6FYxEgwq4s4nt61QFnUuhCArpso5zXR59GTHd2qyWdQHakEKz4AmXTBD2k5b1eVxK4y0piwdf2hdgJ4xP2rrH4R48xRfBU7t7+HPkQBlLQ0u++51V8qs1g70VP7Ao4t4KIsWQXSDXC5QnVcELfuAz97Uu0H2vQ1ru/BvxmXj+nHPTEuTH1I8MATvxI0w8JjeEDL7v/HN9EihLo6sZ3Veh9XZLdQmDHH+6MWtsXzKSZrP8Cc6i2rzXP1OUJxel0AAHLT83UVPp+htfD+z/9t/TkiVr8u8y8IS3JcbP4hWn0Aa0x6cWckGa+afNMsaUZOqcPngwoMpLIMHnbPkJqBPGrFcRBmnyVW5WJBlb8zpcu9nsb+8n7AhpK6IIg67c/Ypp; 4:tnr2aGUrKk9b2pubvd8LqbZheWGAfIIFzONnO02BL6LhJCSaohYnHEm7GWGnFQvADYofL+1Kmo/Nn4yFcbqo52t44jSe8sP1o0LAYOWv1z8GquPOZsmjZBrzbE7khMiVlJLnLhV2Df0OtgjOBHGEJ71QOV/2qv6jyRfJ0pTngdvb8LVISavsgBa1GpF/eyuCUeSz7BzPzA4fscTyyUFkcoco4wRe3rwm4/t1uCvdB7XphelBaCW//rLyDp5KUH0pY4sopfdtLlWapmGVXmTNng== X-Microsoft-Antispam-PRVS: <VI1PR05MB1262B57667598F8A0C1C71F2C2990@VI1PR05MB1262.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)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:VI1PR05MB1262; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1262; X-Forefront-PRVS: 0667289FF8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39860400002)(39380400002)(346002)(189003)(199004)(3846002)(6116002)(478600001)(5660300001)(4326008)(50466002)(386003)(50226002)(48376002)(16526019)(305945005)(47776003)(25786009)(8936002)(316002)(6916009)(69596002)(36756003)(81156014)(53936002)(66066001)(26005)(81166006)(86362001)(8676002)(186003)(21086003)(33026002)(51416003)(7696005)(97736004)(68736007)(55016002)(486006)(6666003)(2906002)(52116002)(2351001)(2361001)(2616005)(476003)(7736002)(16586007)(105586002)(956004)(59450400001)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1262; 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; VI1PR05MB1262; 23:77O0jrQTs3G5zTJhyulHNN+GxTXEHfkdv3Ihgdcna?= 8zfJPKR0NcW+Sj2WzxvrX/ZYRWRDA5Pn0+AKsgqZlvgLztDiqk7NsYrXki+2Sm42r6adY7OjkjLDmAPfJOu/sJuaUkgHKVk7cKoO6LnBE+D0tPB2OQSzi1X9wQc5qDcaaHXmRf6+TvX6r4aj1OaECyWUeMhCM/1hbg0pD5rLh/9Uq0EORDUxXQvzFdvg7ql/vMhcDABbcxSxVD1fHOa6CTn8tR3o1dXbZ+8jMAPF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aIa6W7CqM9YVrf8DmI2sNrjYHm/xH0sdwtHC5RrN0bhp8wCx9LOXb+mKAyVR3n4g+1ziES2Flke7uyhv1CH7x8f9JSAHbluf X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1262; 6:w2bl1t2mdfLplspIfVpKMMUbum3SR0PTL5vIEXLYkD/yevSbO5U6SRPS8MHhTAW1bXrozzLn7U/G2LEXTA6zgt+i79bITw/t5kGPDBCPLu9e450fUnMYUBPnFZTOTfk2i0l1oM8s0yv5+3Bh4cwqM9jergEt1j+1g8/vGzZg8+IklFBcECRs1zyvv99RG0hOcAo3Erq6I5URe6+qGLWesBOVHy9Nz93jH+qqqy1IPwEvwjn7FnEOuYh5g34Jm+tWreIPz9gcVhYHiA0ghACD1YlmPwaMJulegu0I/zTZqLdJmEuCj8hhkeGpbeRyIyEbLb0SSRT0FojIm1d4LEYzKcf0VuYV4CogcCYaRV8j4y3nNpUDBdx4EuZckLFxURfIachUiTUig/1PbcGz6vE1lmcI1jB5NCUomsfARhnD/VKDLs3qA88syPnSkr09y4S4izzLVE6MNu35AZGOHs+2nA==; 5:fH9/HkKJ9g3lGZEb6xlI+b/9f9swZnLX7MXX74Unoytd6rGAGoL/fNM4tR9B3ewfDPt2cPca/7fh9WhM6OoGscnhkj+OkDqfWCtzBYRkbhLDoxm2/FuLoCQXBRScPgy+afvetPUzO3ZehXWUNo7D5OXiyQ/iGp8t4hguiSgXECM=; 24:3max9tmkgG/6KRMoOJVIll0VxVjnhLLzzGcJ2UoMga49xw6cKUVkuhCnZR9oqOnmTA81dGC52JyvG82ydkDYUH6acxkNRwJjpkTU2VkXtEw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1262; 7:LNfYXs9dQ9N3UiPzFK72gu52jK/kNt6JoyRpM0Y/hsMCNB3BXlfohQyQSpuL5CjsNXITfHF33MF958SfPFjLsn35UkubASvKCwjjE2xfM6m8l0DWmUGr2e7KnNwq9IvLnfG7rDG8xRcOLSufOxKZCg7ftObU6SRaKRp9A0GQidiGO99j7JSbvA6I0bOuHJZMx41T/Jh14dLgcn6hp7LxOfQ87XZwBFbRasS3ppDMs9YIQzYLu4hoRNW2mdoMNNY7 X-MS-Office365-Filtering-Correlation-Id: b3463ac4-6027-4b2a-91b5-08d5b5c52700 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2018 15:54:30.0325 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3463ac4-6027-4b2a-91b5-08d5b5c52700 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1262 Subject: [dpdk-dev] [PATCH v4] 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:54 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: