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 19542A0547; Mon, 24 May 2021 13:31:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01C6F4003E; Mon, 24 May 2021 13:31:55 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id C2EBA4003C; Mon, 24 May 2021 13:31:53 +0200 (CEST) IronPort-SDR: Bm+LZijGwjpL4Djud40W9Lt13dZIxRac5xZ87/Rq2k4BNbIbQ2Ry1U9rgw2guWS9tgd+bPoAu3 r6k+8qPJwXMQ== X-IronPort-AV: E=McAfee;i="6200,9189,9993"; a="182231132" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="182231132" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2021 04:31:50 -0700 IronPort-SDR: sr3JQX01vaE4/RejKug9kMmx8su+j/96HdqiPw7vMeXtWSsB5PcVxfDN0VnHjDZm+C4Ot5a5vC XqxuVGBDt4Aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="396919178" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga006.jf.intel.com with ESMTP; 24 May 2021 04:31:50 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 24 May 2021 04:31:49 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Mon, 24 May 2021 04:31:49 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Mon, 24 May 2021 04:31:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdisIiD4jK/zV8/g1Sfo1zQj6e8p6IdChKwS8/161FMPFKh6pI5dYhKw/TiMMjDz7qF+qBWC/2e/FQ0NnzxCzBL4MAagkWCr40APL8GLa433U2mY+1yxYyMCMqiJdFpJFmsOBpRZ/Uhy7z8U6jq1VDf9AaOQuFv2kG6JQsGxAzh/46YweqYP0+pssUtc6qg49m+2tVa2+HtZ3k0d8vAPZ7IgYM8oxrwDHugFDvQtbB/WejszIOXJhwMaQ2tL5glGj/X6MNv+ARtIsnhvyqitPICyyX0TLny9EGPgTH7tjtPHTtg7PtRPYyxx3EKcRlDNhqOrauUeHvp6kdct6HHaTg== 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-SenderADCheck; bh=POmDsfYDzA5QwWnEram86Ey4LfhnDziYlKjD/c4lGOc=; b=Sc/OYpzxDw4UvNlCVBA2UPKdclweK2W9JPe/9FCWNNzWMKJ50xlQK6Bv9l5R4hpqJqSK4DOE+/Tt2+OWvSpQvhhg4SZMbZwB6GQe0fNnvZ56qSEeO5L1WBsuOhPQJUAqja3ldnZmmG7SF0GfC9ygw+SItVaqVph91L9Ce1LZNyuR4djyH33+e/LOBPQb7G1PaLmZRg7wKi2et4C1AmpSNMgD19Cdg0ducyPUeBX8ZQ6StBPrp+AEHZRWnwrcJis+H0mUE9zff7Ki2Je1YqqFcWMnhBRdtLI6wgeWTM8B0NJRkcFSNrGvvkVvngOUngUPcz9n1zvmnPI4n6N2GR9Zmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=POmDsfYDzA5QwWnEram86Ey4LfhnDziYlKjD/c4lGOc=; b=sDZY4gJkYfpyh5Xc1mZdLu4T1C5cP0Vpsfb5PgaSY2Z05IbWbR/NxiHrbxEtVogvcwI9AgNyaSy32Dn8VbVMeRNA7W75JBROFujr2jaWV9snzbbFT4BPYZq/p0VnsspcdQYmcUW7/xpExC1GdzOqcTsh6/n2+y2ah1I8MJT6d3k= Received: from DM6PR11MB2796.namprd11.prod.outlook.com (2603:10b6:5:c8::23) by DM5PR11MB1562.namprd11.prod.outlook.com (2603:10b6:4:6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23; Mon, 24 May 2021 11:31:48 +0000 Received: from DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::d099:834d:f5ad:39c9]) by DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::d099:834d:f5ad:39c9%3]) with mapi id 15.20.4150.027; Mon, 24 May 2021 11:31:48 +0000 From: "Dumitrescu, Cristian" To: Thierry Herbelot , "dev@dpdk.org" CC: Thomas Monjalon , "stable@dpdk.org" , "Singh, Jasvinder" Thread-Topic: [PATCH v2] sched: check newly allocated pointer Thread-Index: AQHXUJA+57RebN6Op0Onq2Xvi7MIZ6ryf3rA Date: Mon, 24 May 2021 11:31:48 +0000 Message-ID: References: <20210524085737.15717-1-thierry.herbelot@6wind.com> <20210524113023.28553-1-thierry.herbelot@6wind.com> In-Reply-To: <20210524113023.28553-1-thierry.herbelot@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [64.43.28.196] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d8e61d73-100a-42e0-b37e-08d91ea784f7 x-ms-traffictypediagnostic: DM5PR11MB1562: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1227; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1IqZJgC/+83oNG5Q2cNAkmS39CLkp+v/tkvN/NIAA4notvpnBvDQ4McCBiMt0areXV9juL0xKohYYpF50YnTeKKdHRElnBUulu7Lq/5hCFntWKkihEfAFTnwr7ChuvunYUzcPoG9tsNwUHNJ+LlGigtjx8xhEFiliohOgnEBbYuo7He8A0bGVH3ae9BeQYKPm8cinfqRr68Wjf+9D5h9vnECjxhiDEQmgaVQNnPFrq3KQ41J/t702q63wunkxn8PIPsg6tpPqHBRWeg6GNCHS7O5uKxUVIe/CPRst9q5ey65gWCXe7JoRM9G7k+dojcJiYcUFsRPfpBXx/FmFZVeRA7OY0+WFIwR5FwIrZcSPOQDDoTUFdIPD42k5/iF2955+RBdFYOjNWovLXwVXAyqrF442wWyPcUkN6sw9H3HhypRSrXmGOayQsI6SdT3GBAz0l1dMfrl7mB4m80bp+fcBeNDsleYRcQhJyx4BoSl3mjd3DUXE7VPMr82MMVEO7vx3oVy7adU5Cs0/ai5YMPjLaapK0Kkb389nuyO5i4vUATie+DbfKe8zA/NjlD2wwqAmyTE91FVlyJBLM3bMecoDysKh2r/l+AyScM6HaHCc+4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2796.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(346002)(396003)(136003)(366004)(39860400002)(66946007)(316002)(66556008)(64756008)(66446008)(54906003)(5660300002)(478600001)(2906002)(66476007)(52536014)(4326008)(110136005)(186003)(33656002)(83380400001)(55016002)(26005)(76116006)(8676002)(7696005)(6506007)(86362001)(38100700002)(107886003)(9686003)(53546011)(122000001)(71200400001)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?0uO/ePDq91A/bRZj9Rt5OKJl/RS6OepGotOMrl8R7Dr441tDssd5ueydX5Ku?= =?us-ascii?Q?oofN0Uq3GDau6XaJVGFZgmdGj/GARnGsU2OLMcncYwg5et2ml8CtmF+Puvxj?= =?us-ascii?Q?bQh5chsMaCEAH72smYMSyJAc/QFCmRpBE3QCn1qaNKPUzcJiPjL2UXQKx+xC?= =?us-ascii?Q?aXNInCaRAdBKW/nUWth99rLF5dnX31yBRF+sY/fTdYgCun2FktfISPCp3lZR?= =?us-ascii?Q?0qxoikdpM09G1I4MscivLkqggJ0g2D2fDtTr84gDkhzyfdgM/GhMEax1DJOT?= =?us-ascii?Q?9WpWoCojW4sLHs4uirSsqUKdVhjMV45ZOC/vN5J2B+tZ9fvd7qLQWTeGeNVL?= =?us-ascii?Q?DGgMoqWv/h/aR9P0ZWfqrg/Bu/ZqlLMwmYV+79xxJGVea0qLl+tyBT3TjDrA?= =?us-ascii?Q?YjktaI6mF8eqz/8Uh6oD4JusbbOKoQ5swmYjCOQs5prSzyEAIrYYjx5Cd7QV?= =?us-ascii?Q?IyNuaHpaqZo7tHVmdKTKIhHy2MCGHtURO2PRHBamJvBtr/quf7uncq+3Elau?= =?us-ascii?Q?JIlXYNDxxvA9nDsAikhCCku57L07UB01tCujXjWKa9gyK3qBV4/bi8uhN3lq?= =?us-ascii?Q?84P3xGTashUNpidmXgNF4pkV/COfFz58ezSmd2naj2NnvH4g6x48KqJudbQJ?= =?us-ascii?Q?wsG5v4Nab0p9CsXMen6vy20a2PBt2doNRm3Br7sllJHUiNZvjMhhEiZVeXxn?= =?us-ascii?Q?fUIvOp2pvcuSUWyThNAPm+YjaBmH7428tU8aBV6xStwb2f5SV8ipKOKUX2Mh?= =?us-ascii?Q?OD2fFqn92A+IdukmYDn1ZlHrK38h0tebMFmGhBMfyWzn4wX6sKfsxOABXvly?= =?us-ascii?Q?bH16HAzWPjkHpc7j5zeasI+y/KUMtHmoqHU1rE5Ex45kgFNdHD/+fEAMlaiH?= =?us-ascii?Q?bpG6DNEQcIIWrk8a68Ad0szEK+sNSRxJNdgtiWsI/6+zHnFSzDx3K4LDbq4p?= =?us-ascii?Q?LI04/7cpiG9Kh+Q7yROztpGN4zozpupOEFjSOdzWalucaRh/PClNzohCPbFh?= =?us-ascii?Q?Uw47shbjt6+tJJvsW+qFL0eCHw/fx/SrueXyrQ7WNBuGXv4aKL0NKicuSrT2?= =?us-ascii?Q?2W7tFWEHQH7In8pC3xbZ59Rv7ktvXmAGfO0cC8YdAh4MX0+jspFVsmjL7R1e?= =?us-ascii?Q?GLZZvtH2yUF7PLX4N/XQ4KrEbJe5HvOeIU/OdnVEXx+n6QLurVWWKVFOjYnk?= =?us-ascii?Q?0UiNUFpM4t8hT4kZOORs9v+eLYZuNVqYasYkxHKKT0NkOmDOj8CegWB2dSDi?= =?us-ascii?Q?N6sRMfSPXYoprjk/eoO7SOzW9kxbCQJHbMC9WNCBU3tsorYdGxcqyQxiThGJ?= =?us-ascii?Q?Qyo=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2796.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8e61d73-100a-42e0-b37e-08d91ea784f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2021 11:31:48.8073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AdZDBKU0YSL58yJVmY2lw7waDtn4/uFR9tPHN16DOQi/z8EtXOPH619oagYwH4/XoVzHa41cp43NKrFJLXKs0+pRgT7ZrZ5JlaFLlnpSOMM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1562 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] sched: check newly allocated pointer 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 Sender: "dev" > -----Original Message----- > From: Thierry Herbelot > Sent: Monday, May 24, 2021 12:30 PM > To: dev@dpdk.org > Cc: Thierry Herbelot ; Thomas Monjalon > ; stable@dpdk.org; Dumitrescu, Cristian > ; Singh, Jasvinder > > Subject: [PATCH v2] sched: check newly allocated pointer >=20 > Check port->subport_profiles after it was allocated. >=20 > Fixes: 0ea4c6afcaf14 ("sched: add subport profile table") > Cc: stable@dpdk.org > Cc: Cristian Dumitrescu > Cc: Jasvinder Singh >=20 > Signed-off-by: Thierry Herbelot > -- > V2: reword patch title > --- > lib/sched/rte_sched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c > index cd87e688e489..4a2c0e27550d 100644 > --- a/lib/sched/rte_sched.c > +++ b/lib/sched/rte_sched.c > @@ -961,7 +961,7 @@ rte_sched_port_config(struct > rte_sched_port_params *params) > /* Allocate memory to store the subport profile */ > port->subport_profiles =3D rte_zmalloc_socket("subport_profile", > size2, > RTE_CACHE_LINE_SIZE, params- > >socket); > - if (port =3D=3D NULL) { > + if (port->subport_profiles =3D=3D NULL) { > RTE_LOG(ERR, SCHED, "%s: Memory allocation fails\n", > __func__); >=20 > return NULL; > -- > 2.29.2 Acked-by: Cristian Dumitrescu