Message ID | 1525695435-14917-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 5A1862C72; Mon, 7 May 2018 14:17:33 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20078.outbound.protection.outlook.com [40.107.2.78]) by dpdk.org (Postfix) with ESMTP id F35252C6E for <dev@dpdk.org>; Mon, 7 May 2018 14:17:31 +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=WbXQLAfqsM/QWZug1Es58F2DbOMUW0MzcvFmotzNEFA=; b=rp8HbZeu1397oNNYx9xv/KA0YJz7xJ/4q+4DdEEeFe5fhVwGaMWv/ySUbOHd4saQQMPooHFvxDxHPEtrKJFn2ULiz7UwJsMwryrlGpCAjM4G3P10NOToDwF7U36onydiz2a7I5rqP6UjRqfrEU1NLX3kLmG3Q9p1ucaMVJD6W5o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by DB5PR05MB1254.eurprd05.prod.outlook.com (2a01:111:e400:51cc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.17; Mon, 7 May 2018 12:17:29 +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 Date: Mon, 7 May 2018 15:17:15 +0300 Message-Id: <1525695435-14917-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: VI1PR04CA0111.eurprd04.prod.outlook.com (2603:10a6:803:64::46) To DB5PR05MB1254.eurprd05.prod.outlook.com (2a01:111:e400:51cc::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB5PR05MB1254; X-Microsoft-Exchange-Diagnostics: 1; DB5PR05MB1254; 3:HytzPg+dYUETUBSaxjvkRZBjp3rIyaxf6WmbMdYuEldelIdEEAoRnDHKPR6SbMe2UhB99Ik5qOJpomG53prehFp/9KuA4j0c7E4kjfd+k4qY2bCc2brK/ZDayg0t3zBHMuusJEMbyjpcLyn7ZtX3FV6R9NFLYKJgBeBfrDhkepA9VbDFRrk/9wt5dcHcC2q4dM/BQoNnFPtfeHz9IjqgQ/9GKjQCfhCBJNYNIr+YQ5wYEVCawC5FlPprjw5sKt8F; 25:KyRnVmVZS77ezVxbeweWlvaqjRV7/xSAdUXJk8t2BTJ8XP5lIqHkK2kX7jAbpxHCOONuznqvCqTEJfesUBDYCU0h3sztaol9kVv9XvCjl9Wp6kMNX7lrQB32L6G+N8245MAeMsgpMJxTRH0G+9gzBnuXoSkWv++IEU3ETUjaDohnyIHkuVxhgzJLdY7GldM98ZxcOMSZDxSLuctydsWVP3pox076hPQdeNr/qAbk9g6CM6iI8kbEWQTfA168Y9zSRQyb5a3JfunIjcu3dUO0xgDNcMEplUP0gbvp1MSDNu7N+Rvb5YwUEUvOjpTRxGZ+82a2XMA/TRy9KKK09+eKrg==; 31:i+7QkGO8+oEKy4ydTkC5+hiLOuhWBuEKcIGqg4WL9D9fQ3nAr/ZaF6izG7IBNj0PkjT8WqDPcE565hEOoffUKjvD3UVXwzjuk4ZxWt8xnZwOxe0YGCJEhkfgxKR39AYV7lTETKjG3Zt/dvMqeVPtcOjFTG4TsO/2Gyd8K69t6nRr/pRIc4QtWlY10tbzEIuvAhRYhkx6MUMYrrJDpMBu8vC6Q3A+O452J4AVL5y9vFE= X-MS-TrafficTypeDiagnostic: DB5PR05MB1254: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB5PR05MB1254; 20:wWKYz8GS3tB5Fblcne9bRpL9cO1N2SkI0XWjEuPEYaCM+e99csyNZVossD+mJIbyfpmIBOvBVKBsnG/6ESKGfDH5bX1SGYQ40X3h4oFYQ5KcudSguyQ2YUeNEfIuAZL8x96YCkW8wIbhvN5L2hPlbj0OU+rQQ7gWG8MCbIZnEDB/lga4ZR2fdL/1Lk4WpMVvT9NLhm2CVu84hP9MKhPN3i7StXcB0NvizTROdUJEmAfRQo41cDYi3TWMMWA0wmGoC3N+RHrNF6ifDd95kdLnNINxPAkMqNF1XO/pRpb04lBbTSPje4RLNN4PTNhJLEpW5jZtVZqNfPtKaLmG4HCSSexcail27sAl69ncOa8Iq7g4Ffrx7P5N3/eg4sWL/tex7AjKzqcWUfWZFD/nONk4c+ActV1pMO19cTccAibBtK+c9KcxKNpErs0g077DPEm0pJAY9Fe+JZlWlBPSDy7vF0+zmp17E0POQhQaiCUtsWPMP0+CJPDTMYfpZwK/rWyH; 4:NIe4W02sHZXpt/F96N2oUR93u8eN/Bi3toola8JY3HAF8EPjSe9YwNrAkrwkuWtLggxNrWewfl0vaGv0emSvTGxNBGmTiwWTogA8SvSC6/vj4KKaQrosahXs1kuOws9mwjXjT+5of2E0O37obiG5Fi/Q6kiiq7qvKwPaL2Ub1vbE6FunFwwgfiWq5BWfEc3EfbrRm5g2H1M2D2xAchIc/y4eVXGIa0qRDCq0lo56WacfJVty+YrZalvLdEPH834vPCuaQ6x0JK2PwzbOmg9vuw== X-Microsoft-Antispam-PRVS: <DB5PR05MB12546EEA0F118E1D1D2D33DDC29B0@DB5PR05MB1254.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)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:DB5PR05MB1254; BCL:0; PCL:0; RULEID:; SRVR:DB5PR05MB1254; X-Forefront-PRVS: 066517B35B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(189003)(199004)(7736002)(105586002)(107886003)(1857600001)(106356001)(486006)(53936002)(69596002)(59450400001)(47776003)(956004)(316002)(16586007)(66066001)(21086003)(97736004)(2616005)(2906002)(476003)(81166006)(6666003)(6916009)(305945005)(4326008)(25786009)(16526019)(48376002)(55016002)(186003)(8676002)(81156014)(50466002)(2351001)(478600001)(86362001)(7696005)(26005)(8936002)(33026002)(50226002)(386003)(2361001)(6116002)(36756003)(68736007)(5660300001)(51416003)(52116002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1254; 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; DB5PR05MB1254; 23:j+miV1CdjUlQqlktk2r94SAMRFRq3yAoCwNhlJv91?= gP/FAItLUneK1lq4xujtXBjtbauj5Lk9E76C5ays9xyW9xOMFRZMi6vjkQX7uCjNl5probUsALPztr5pUwiMrZwPY+Mw+6F+uFYfmYOK2y3elhESkiRG8SZUXk+aNosV0gjYczOUBWyt6p4v6DHRr/ynBQb5uFfU9wD8vyzcCoo5+bvsBfnKB/wVQmmMSiEoU4MElIX/GWbyVBNqgfHat292hauUiwBGn49pIp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wU8EjqMyxQgXLmVZvUEUtSZPEJiJBwZaEIS793ZBni1RLFrygqs4eNaESUqjET/Q9ilsfPQXkUPnr8VDMrh+A7XN3Vzm7wZ3ahc/sdkUB5rtO5BWy8gqmRCMbdiK4Dn9KcWcDjF2JoOJUp9jbfgqAgVRSlS2G93boXk1U2M8B2rf8Gaj7O9xSXT1D/3KTTBsXe1cBh X-MS-Office365-Filtering-Correlation-Id: 201f963f-fb7f-47ef-4ba4-08d5b4148135 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2018 12:17:29.0860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 201f963f-fb7f-47ef-4ba4-08d5b4148135 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1254 Subject: [dpdk-dev] [PATCH] net/failsafe: fix starting failsafe with invalid MAC 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:17 p.m. UTC
When starting failsafe with mac option, and giving it an invalid MAC. It
will cause a segmentation fault due to the hotplug_alarm installed on an
invalid subdev.
Fixes: a46f8d58 ("net/failsafe: add fail-safe PMD")
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
drivers/net/failsafe/failsafe.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hello Raslan, Thank you for fixing this bug. On Mon, May 07, 2018 at 03:17:15PM +0300, Raslan Darawsheh wrote: > When starting failsafe with mac option, and giving it an invalid MAC. It > will cause a segmentation fault due to the hotplug_alarm installed on an > invalid subdev. > > Fixes: a46f8d58 ("net/failsafe: add fail-safe PMD") Only issue I have with this patch is that it should fix instead the commit Fixes: ebea83f8 ("net/failsafe: add plug-in support") Which introduced the alarm_install routine. > Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Otherwise: Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> > --- > 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: > -- > 2.7.4 > Thanks,
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: