From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0276742800; Tue, 21 Mar 2023 23:19:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D538340A7F; Tue, 21 Mar 2023 23:19:29 +0100 (CET) Received: from DM6FTOPR00CU001.outbound.protection.outlook.com (mail-cusazon11020021.outbound.protection.outlook.com [52.101.61.21]) by mails.dpdk.org (Postfix) with ESMTP id 13E5440A7A for ; Tue, 21 Mar 2023 23:19:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VTCHLIVrdR8FPgyE+xu+O53FDvYCs8LBx6qpa9eNuhZdvMwPW6Df+tbsyNBwI6fQ18kwxD02kYq8aNDN/TJbbbSmrb3sYr0wOhJqVJBQGXteHLjf6tWlA6/3godfzbH3EA0PiJ1iyZ+Z/SI10rvdLtkI51wNC2bH9bjD+Z/mR7ABXU/ivFgVlDk/bvXcFV6V/3cxD7HsSZLDrsleDCqaUCMQyItwEwk8TynnsE5cTM9vfcQYv0luPh7r5MwFBx1/1+rLvmwkHLBuZZe0C5f6/0uuZ4M7pSJYasT50Tbwig62VebrUG5R7km5+fetn9/zuxJB7w7uAoFgSNyHOWTfhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xIlVCCgCkpBGPiUi087UVvKBH/707xCJPMWwKBllIx0=; b=WFSSnSsHj9QmFmBnOwawpglyVULSepYxmVGhSaebPIdn7EUJ2WcjAMdcyTr+aCbgWn40ecH/cAYK0ZaWy5bI1nfV9Rxl04NDfZtJ0ghp8mvgEWpJ1ztbCrc2s5Yr+mVjxNjmurH+PxGl10gu7OB2aPO4pV+IwOJ1LyK1br+9XoCc5DQGnfccQZHEM5/e+QzqsiUQwnh+F1i/CEDCej0GkAYp9z70BMNNKSkxxeJf05cBQe8Q4i91wD4unVNgjO0hFrTgfgiCWBXG9RxP5G057NmGMJWZzntw4EnZPKyzmS01Pmiwg+9/oYA3c20SFyYzPuD0g+Gof4IlVP8hnhgbvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xIlVCCgCkpBGPiUi087UVvKBH/707xCJPMWwKBllIx0=; b=BfVH5cDGT2NLkR/5Icmeuif6J6UsB2VdErfvV2orsYFRVESyQnuQe0N6M2h49VlDvEHLOsPoNRcqoQtUzw4wLH9JUQTKkMyoY22tGJWrRJW1wzy+Hj7dPy1MPd0yhPSaDyYPrzyJyFXu6Fl/5f8MUkQZElIKJQQANZ3yBNIEKVg= Received: from PH7PR21MB3263.namprd21.prod.outlook.com (2603:10b6:510:1db::16) by BL1PR21MB3090.namprd21.prod.outlook.com (2603:10b6:208:392::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.0; Tue, 21 Mar 2023 22:19:26 +0000 Received: from PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::f5a1:139f:7a0e:4c5e]) by PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::f5a1:139f:7a0e:4c5e%5]) with mapi id 15.20.6254.003; Tue, 21 Mar 2023 22:19:26 +0000 From: Long Li To: Chengwen Feng , "thomas@monjalon.net" , "ferruh.yigit@amd.com" CC: "dev@dpdk.org" Subject: RE: [PATCH v2 20/44] net/mana: fix segment fault when parse devargs Thread-Topic: [PATCH v2 20/44] net/mana: fix segment fault when parse devargs Thread-Index: AQHZWw5O5JjfvI1TykGCgnqDp4roiq8F0BmQ Date: Tue, 21 Mar 2023 22:19:26 +0000 Message-ID: References: <20230314124813.39521-1-fengchengwen@huawei.com> <20230320092110.37295-1-fengchengwen@huawei.com> <20230320092110.37295-21-fengchengwen@huawei.com> In-Reply-To: <20230320092110.37295-21-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=f9c248db-a8ea-45d4-aa5e-438918e3bd7a; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-03-21T22:18:47Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR21MB3263:EE_|BL1PR21MB3090:EE_ x-ms-office365-filtering-correlation-id: d673b0fd-9831-4079-4f86-08db2a5a5519 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UITDhZQGX7KH2aUddRV2ewDn8IKOHZakLBjW0jg6arHLaAjQQpw2rDHsXA7bLeyWtEQrWtpMeZ4lL5APPWQatNpwrVxjUmajyRK3Rga9t4LATmZciV0axsraH+949yoCyF7RT5sVdwNWenN+eF02zCCmeNNGfGngPx8BnhVuoqq/1v4IYWRuiNnBSWkSAUsCq8wU28e5q8H5kG9UceFw2erJq8OLGIDJiB0OWUHHxVX5nonJ3y1Q+Nl0YMFng/9JsW96/2AtsuE+hhQowgDFusdvXwfQUfq5HUMTEadzdALOvF+eW9o4B0kXQJ354y6u95SRCDP0Ml+pSpG04rQBAGX7zA0i7R2xzQJryH+5pfOYWQYo5BxmoWzv037SxiVhnCcFKAF5wfbTQmtzTA0TjzhJso32PvTjjguNMfu2foeLfjBKB5wigpmaFry+ksNlBI74rI/K0rv/OKuua1dhMkvYm71Jw6pPxDuITx7tOf9hyxMemFuwJ8O2xFcYRQDFgIk8Bbvgd2JRbyZc3r5bYrTNi7Ifkl4oavNd5rUNG6qrz8T5lpkN8L0Xn8JE7wUbMJgmZo8fRZhH04snbZfTWCctPJu7IxUVpLsld3uMR1/HzzfJ/InY4Zoonx/lflRNk4qfvFqOgolj5bK2y66P492eQSlGuSsddqASqf3jWWdT8BxxKvDSzyGY8x3msQzy0hdRS/gYicSpCz/iAf4qMwZCVVn2SOmD+08mmREtSkMCxtNA2mhlf9XLZCulsIZ2 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR21MB3263.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(396003)(346002)(366004)(136003)(376002)(451199018)(41300700001)(8936002)(2906002)(52536014)(38100700002)(122000001)(86362001)(33656002)(7696005)(38070700005)(82960400001)(82950400001)(8676002)(5660300002)(8990500004)(66946007)(10290500003)(478600001)(76116006)(71200400001)(66446008)(66476007)(64756008)(55016003)(4326008)(66556008)(316002)(186003)(110136005)(9686003)(26005)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ArhFT4Mmx4q9j1CAMp/fu1KurXKFWRP62j2DiQCyaWPg8DRJ7XN+7XzoEVWZ?= =?us-ascii?Q?la+/njSDOjw/n5qrpbYFs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Q?eX6+aKOPrAy+KhZoeBEjAZnJqABkZr4onG77rf1DV06Bd1bcy+59bijDM8nW?= =?us-ascii?Q?YNXe+1M3jsMbyn/MWLVZJGubIdOT9tFwNFMjthZbTAG2kjioRKJ8iKn1PMqr?= =?us-ascii?Q?prFS1PZzVKCpF8/IheyPANS7j/riODUjJ2oAAVHxez5+KFy3aQYDmyBzP1uJ?= =?us-ascii?Q?19AIqTn2HbLgUpuzictBav8M7QHHfOPwek6a06l4N3SP7yGInfrzIQxFaBAy?= =?us-ascii?Q?Et7bzo+W2cS1sgzaufBsx6TVRJNFgzb9WJbJ8hyoHVF+67Czxo/W5pQntwhA?= =?us-ascii?Q?xHH/dwTpAOLRO7Tzrl5yjT8eEDnfe4gQFtUbDBR7VNPHa8bplW4aJ7w0s4P3?= =?us-ascii?Q?QNCZw7ez7MMnVM4pLGk9lh/oXkFgCGrnlQfKSkQ+K9gawL+K4MVpM8NTKPu6?= =?us-ascii?Q?VuZpgObQVduKIksdQk+NoobZ4oT1sbmKU7Dv1m9Qx7jPvkt/scobXFDWUd09?= =?us-ascii?Q?V0ekyIh2UiKYI52D66KPPx2zfh+g05vDOTtjpSAha5P3pE2j0yBvXsYXTlCn?= =?us-ascii?Q?FourCFHv4KGSew6c9FXlqxjak/I3NTjiag8niVR1ydoJpaRSevkfhSW7+0RJ?= =?us-ascii?Q?xneY03Q28PTLXDOAVaf3TLUmO0xiNfu6/EyRf0j5?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR21MB3263.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d673b0fd-9831-4079-4f86-08db2a5a5519 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2023 22:19:26.5963 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tbjhJxLA4j+VuhyrPS79hYDvnXkM3z24Ppbk99TNN13EoaO2+pgS1lWklIiYfNHiIQoDgad+Jvu58t9u27koWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR21MB3090 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > Subject: [PATCH v2 20/44] net/mana: fix segment fault when parse devargs >=20 > The rte_kvargs_process() was used to parse KV pairs, it also supports to = parse > 'only keys' (e.g. socket_id) type. And the callback function parameter 'v= alue' is > NULL when parsed 'only keys'. >=20 > This patch fixes segment fault when parse input args with 'only keys'. >=20 > Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment") > Cc: stable@dpdk.org >=20 > Signed-off-by: Chengwen Feng Acked-by: Long Li > --- > drivers/net/mana/mana.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index > 8a782c0d63..9c097c02ba 100644 > --- a/drivers/net/mana/mana.c > +++ b/drivers/net/mana/mana.c > @@ -750,6 +750,9 @@ mana_arg_parse_callback(const char *key, const char > *val, void *private) > return 1; > } >=20 > + if (val =3D=3D NULL) > + return -EINVAL; > + > ret =3D rte_ether_unformat_addr(val, &conf->mac_array[conf->index]); > if (ret) { > DRV_LOG(ERR, "Invalid MAC address %s", val); > -- > 2.17.1