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 1314343337; Wed, 15 Nov 2023 10:41:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD9B0402ED; Wed, 15 Nov 2023 10:40:58 +0100 (CET) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2048.outbound.protection.outlook.com [40.107.247.48]) by mails.dpdk.org (Postfix) with ESMTP id 0A79940261 for ; Wed, 15 Nov 2023 03:43:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CCqcTL1pYZayeEOWgTxYiSvhxp2Tebrfu5EEYjiwMn14VXjNP9vuxpvchTkHBY3DBAxB6/T4r19z11YKSgDa6x4QUEGLN9KyH7o7WGia0EvSodSdKmgURET7WDW7e+3RtQVm31zujYqmN7zNsF4aNYRMOZ1Q0cPOij1qQbeYpps7D/7EH5h9cGoETZmD+fCD+vQM2hL+PDl4m68r7flD8NQMr6Dppm365CTOq6Eoh5XoRs7qSz2PoSfpRWS6V/8ASKF+Cx4MnXx7egZUf3h0gC/vzvtvIidEBZP4NGUT7kLYdcMNETyXK/7IPsYgknKD6+O4Iv3pevjEyI2Vx/0E/A== 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=uQzgyCsOzWDgjQTGvEQVuL/8Z5VkhkNU1zNzb6f+dLE=; b=Otzf31YFykFMAkWftLW3d4Xqc+HDVj1Cuz3yodXpkABp8GcVOX8V4lVHhbc2VH223evcnXg+hONRNKGWDrwQoT1avJgqTbo/t+wPnMjXQasBBh3KBG2g7tZTCAOd2pR19EccyUYTjvQJ7tNlUzfVRcHmEix4C14YX4zYFP4oEwrkt4fJdEmHyVeXogfAby1XFca0QA6dFb20hzNklk1xEPpXVtSTUF9jd7MYh4LahFgw0U6gg+2Wsd4TdH1k4NjmRs52zK79kMFm9hHfNUoA4He7DU41dn5hvgK6TV+B1YmhbsEv0Fvtz8uxZsD/DlF9VbG9ucCrGC1svY2BS0Un+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uQzgyCsOzWDgjQTGvEQVuL/8Z5VkhkNU1zNzb6f+dLE=; b=dU5k4Ql326XWQrdu7Z/pOOzk7p1dGzBoDTKwt33tZ9rKZCDgwLln8418ZLgzrjEbO6W9ehomdO6htnjEJw83RTEQoikOFRH41Khiw0BvRdr4xQGnqSkTi99Xrqw1Noife/Brgi9QiggOQeOrB8T+nbbA/G/nSyvDzgK0Ux88Y8w= Received: from AS8PR04MB8562.eurprd04.prod.outlook.com (2603:10a6:20b:421::9) by DU2PR04MB8645.eurprd04.prod.outlook.com (2603:10a6:10:2dc::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.18; Wed, 15 Nov 2023 02:43:44 +0000 Received: from AS8PR04MB8562.eurprd04.prod.outlook.com ([fe80::1aee:7715:a032:5079]) by AS8PR04MB8562.eurprd04.prod.outlook.com ([fe80::1aee:7715:a032:5079%4]) with mapi id 15.20.7002.015; Wed, 15 Nov 2023 02:43:44 +0000 From: Sachin Saxena To: Chengwen Feng , "thomas@monjalon.net" , "ferruh.yigit@amd.com" , Hemant Agrawal , Shreyansh Jain CC: "dev@dpdk.org" Subject: RE: [PATCH v2 02/16] bus/dpaa: verify strdup return value Thread-Topic: [PATCH v2 02/16] bus/dpaa: verify strdup return value Thread-Index: AQHaE709QNal98o9CEODWxO/dP1gtbB6s5WQ Date: Wed, 15 Nov 2023 02:43:44 +0000 Message-ID: References: <20231110100117.8350-1-fengchengwen@huawei.com> <20231110100117.8350-3-fengchengwen@huawei.com> In-Reply-To: <20231110100117.8350-3-fengchengwen@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AS8PR04MB8562:EE_|DU2PR04MB8645:EE_ x-ms-office365-filtering-correlation-id: cadf6865-476a-47aa-685a-08dbe584af58 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 64SWCQCpWVdamH9fzRhxWE1TNs0ZHONSYD3mDMFXmeHVBgErmDe+ZL3/67TAZOUshv+Ja460tw77nfcemaF4QsV5knFCn74a9YoKI5GFoslFukVR5+CS7UQ823MBo5WPJU7s87mZ4Zo+bZQN/rdkUj3y4J9vO1QzeMGIMhCCUeP+7rJ/s0apBUk5sXKB9C4QeFCxb6PAkvLW0QbHOLfYYWNWvZFgFosBY73vzImsHon6JlumCgTe2XWrVIQOEJ0h9CbqWVS9knt6x2jRfD5pGmmGfe5C9C9ePD7X2GWcEXu+EiKcAUnA6VZg/Bwa64jI16MP4u+2LmWs2PovF4AZ8pG4sPJDv2i6IHwkofxmR6adL0Jbt7+Q4zI9pJ0WtM0rPECp3o//q/T1F/AKlxgDOPIQfSt1CqqdVMUFl+gK0JFcR3t0kdVN65y1TP14NarXUSvj1FCwqTPLRgi6cxpxdkqUFDOhfWrbgh7JeuOVKrVsoLx18h7u8ld1ZF0T2WFyFCImEYuCQl3KGwoKcuzvgKzohfaDjFyBNDrK994LIVnIWHdy9lHX4MMd8/3030Qkcn1eDzmerMHNP6fBw6++m3MuHkMvBY59cxW4B0cxf5Rcpc1EWl6qYqrtq/12y0Bf x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(376002)(346002)(396003)(366004)(136003)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(9686003)(8936002)(26005)(478600001)(110136005)(86362001)(52536014)(8676002)(4326008)(41300700001)(15650500001)(2906002)(44832011)(5660300002)(33656002)(76116006)(38070700009)(64756008)(66556008)(66446008)(66946007)(66476007)(6636002)(316002)(53546011)(71200400001)(6506007)(7696005)(38100700002)(55016003)(83380400001)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?oG40Y959aefzMvn+EL0ecI3SgQJvCYSPu+OBhpdAHSN9jfZIzVPBmoTFHLLo?= =?us-ascii?Q?xLviLn8L6SykD+YY9dW/2cnEyqSgL4UqSI89sez+ioSR7o9WnwTMWRdBdlXE?= =?us-ascii?Q?s97qZoenRKcr5zTAQS/K3SADoWeU6Goff0oCI83goeKwSFVNjJ0oioS8Bij0?= =?us-ascii?Q?2GHFXXrltR2YCz6erVBmsn0LHyX47IkpRqTwr84YIemPHv077SsvHEZmuM7v?= =?us-ascii?Q?nhWPOx0rxHKNRLOs3WI/WWuCeRl42KR3LmaPjA7RqoKcGjYclR4vpurjLRaH?= =?us-ascii?Q?V0Pf3zgVYTzrjRIJJK0l+nwPL2fU9PZeiqFs6WMmDYf3oJdNr3yrznPERc53?= =?us-ascii?Q?b3WSvZ3qpSbA0n3rG3uH01uZCBBAJ/kKiwqIRd6OR/G7YBYsFEvnowJtr9aK?= =?us-ascii?Q?mJv5Xbksl5QntkMtAsiC2LiprTQlwgrWXvZHoV0KczA4TW+f3N2jiXmcRsMG?= =?us-ascii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JwhaJsKRKURDAJ?= =?us-ascii?Q?PssD8OLWJWSpqhCMVwft6Z9Vpttd5eMiHA7/v66ju5Pr6thLM6oY8W4fSC7b?= =?us-ascii?Q?1B8q6VMBgxQE1dYyiv+oSd+ZTjW/zZfCgfmVNau8goaC+o7etvXHiTyYPiPg?= =?us-ascii?Q?hUIH4taYqDhJpcETH0cxb4sww+7ar0Ku8JLCeUlb96//d6FSj1y9SbA0zshU?= =?us-ascii?Q?FcdhjDdl6ZCvanVxVz1FH4a7W1wForCM/YPYHrGF?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cadf6865-476a-47aa-685a-08dbe584af58 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2023 02:43:44.3015 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +dXXmaI718VGl6+KeJV9cJ3qjpv8S4FSPrSrELNDQDgo+VaJsUmSO4UljURwRSanjpZbzw1fK7C44RYbYRkZKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8645 X-Mailman-Approved-At: Wed, 15 Nov 2023 10:40:55 +0100 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 Acked-by: Sachin Saxena > -----Original Message----- > From: Chengwen Feng > Sent: 10 November 2023 03:31 PM > To: thomas@monjalon.net; ferruh.yigit@amd.com; Hemant Agrawal > ; Sachin Saxena ; > Shreyansh Jain > Cc: dev@dpdk.org > Subject: [PATCH v2 02/16] bus/dpaa: verify strdup return value >=20 > Add verify strdup return value logic. >=20 > Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops") > Cc: stable@dpdk.org >=20 > Signed-off-by: Chengwen Feng > --- > drivers/bus/dpaa/dpaa_bus.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c in= dex > e57159f5d8..a67f5c9ab5 100644 > --- a/drivers/bus/dpaa/dpaa_bus.c > +++ b/drivers/bus/dpaa/dpaa_bus.c > @@ -791,6 +791,10 @@ dpaa_bus_dev_iterate(const void *start, const char > *str, >=20 > /* Now that name=3Ddevice_name format is available, split */ > dup =3D strdup(str); > + if (dup =3D=3D NULL) { > + DPAA_BUS_DEBUG("Dup string (%s) failed!\n", str); > + return NULL; > + } > dev_name =3D dup + strlen("name=3D"); >=20 > if (start !=3D NULL) { > -- > 2.17.1