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 47B7B45AEE for ; Wed, 9 Oct 2024 08:27:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3BE6440DD6; Wed, 9 Oct 2024 08:27:41 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2071.outbound.protection.outlook.com [40.107.237.71]) by mails.dpdk.org (Postfix) with ESMTP id CE8D7402BC; Wed, 9 Oct 2024 08:27:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bMZcpiGHwqbPUP5pxmygpRMCwNao8jV0mjWwjTcALYKgAl1wftSTDeOh2E2+RTJLj1qPVABenR9/7jcstpPdDhHGkPDZ1dDyu6z1N4CBWipig6OPOvPzk2tnDUuVxCN+OtyiUDbdiFXRfZIt8toTCEPS6qOBfGOGOhz+efB2VfDjvRGIlQ7blSv1ghg/aGeCl87fpN5sN42run5D2rgSJE1qshXaibegwYaClJjDKohDihJIKuOHYHQ/F5d4iJ/Fm9qqcImUXkd7a2Bwh3+v2l59ApEYbH+4rllObRM8S0PRICdie78N067FgIZQbp2Ew8wVRg1tQO5dFDkUAeV7XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=u3+T09m1cGHWhyb6aGy5nffu5uvxZL/NetqO2Wmvo2w=; b=AQX5unOa12e+fNPS1jqBCQ6XmHVIXNtb5IKVC2O3sZovJqhAHs2FLK0UaEfpTaoUCc9qpQiffFSkK1fBR8KuqX/oCz3hyaATygQsVdhHxh5g/XqUhRYfGyvoDAIA2RgxpWuWNjDnXrWfwff+1iX3cbuDwapmFMiFTvILWARfzeiC5axdrJF4OhgizNySD45EAuww4l12pdD7gk5i2avefndi3LXzbv9U5Q28GduHyv5QO00P0fGUN147oHut80KTonbAsLnVkMDIiDEmkuUlvLW2hEXixQBz8bms6PG92FcPOqxEsE8Zto5TZNt7YMhpM9fo62Xo9fVFha5lksxpmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u3+T09m1cGHWhyb6aGy5nffu5uvxZL/NetqO2Wmvo2w=; b=C8XA/Tm9MEdC4iO3La6s3ljsc1RUMvcOToY8we6HVYCQMcKLuBSJKVs7qd6Uh9/iv3AFk1JjMmrYzKNOWY7PrBEkPHij2DnkpS1IwAcPljzxXmB6CykX4KoY7VM9Gf2awIvgKApGtjLlpPa2aBT9yu3SBZB6WKvIwTVDCG6PTlx6a68CHFaHD052Zqr4AYnLw8nct1nNSd5FwQ9OEvDLLV6N23KZzIX9j+9dsJAVFZOKcmelJlV5NoD0p+hAMY9iDR3DDhdUwUMLMiubSe8jV52AulqhTzX22izi7CH23UxqP+bjhsEYChEd8/pkb8UJVwmOKW0fC4MKplWkAa3seQ== Received: from MN0PR12MB6103.namprd12.prod.outlook.com (2603:10b6:208:3c9::19) by CY5PR12MB6180.namprd12.prod.outlook.com (2603:10b6:930:23::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.19; Wed, 9 Oct 2024 06:27:34 +0000 Received: from MN0PR12MB6103.namprd12.prod.outlook.com ([fe80::3c6c:6f63:917e:98d8]) by MN0PR12MB6103.namprd12.prod.outlook.com ([fe80::3c6c:6f63:917e:98d8%6]) with mapi id 15.20.8048.013; Wed, 9 Oct 2024 06:27:34 +0000 From: Chenbo Xia To: Stephen Hemminger CC: "dev@dpdk.org" , "stable@dpdk.org" , Chengwen Feng , Maxime Coquelin , Jin Yu Subject: Re: [PATCH v9 05/17] examples/vhost: fix free function mismatch Thread-Topic: [PATCH v9 05/17] examples/vhost: fix free function mismatch Thread-Index: AQHbGaH6uGvNaq4z9UyGVRdM6hWVhbJ99VWA Date: Wed, 9 Oct 2024 06:27:34 +0000 Message-ID: <61F8DCC3-3C6A-42D9-858A-084C153EE5EA@nvidia.com> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008164842.139045-1-stephen@networkplumber.org> <20241008164842.139045-6-stephen@networkplumber.org> In-Reply-To: <20241008164842.139045-6-stephen@networkplumber.org> 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=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR12MB6103:EE_|CY5PR12MB6180:EE_ x-ms-office365-filtering-correlation-id: 914abae6-1975-4ac1-33bf-08dce82b7661 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?YyEEFtwRBiM+0YOPPtcJVxkA1XdorKTjrzMQXyj1LCF1y6W/qJ3mOgzEBMt4?= =?us-ascii?Q?polvqLYL4mJt9AJaueaW10VnlVRuwX6ouZ35pm/CmAgqttX0THZxZRPozOtn?= =?us-ascii?Q?dMtd6MN5fiUjY5iBflMrozcODQserrI1heLyEeAyowI6aqnpdDAcQpJc1ZUv?= =?us-ascii?Q?OxPQRN28I3xhOL6lwVG7uX6pzPn1tpMU5NJSSt/YSy+ACxejQmfj7hZ1/zaT?= =?us-ascii?Q?vixefcPqxV8yOMZ8dfLEVBR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-ascii?Q?ODp/hJfCAz0knc8IvOLO9P0Mqt6VFaGIaKk2nv6YJZ2SFvir4WP4WIGr7ATt?= =?us-ascii?Q?yLvK+Mp8NBBeoVPRVqm+xvFy9K0Q2Nf1TisOyxZyAMCrWsOLKhq2cOEotYd5?= =?us-ascii?Q?MJTEdU+QwwFz85KlpM299rozAY7C/AO6yjQWSPh2htIsn1ArROX/zu/4KQAD?= =?us-ascii?Q?t1Rb+kNbnekGmP1jwcFUrXSo6MlCVDKAaEtuU1m6smmjpw=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR12MB6103.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6vQIg6ubjiKHIH/XE6m1kyWuzu5HF7ufdip36lXH5375nQdVAZ4ZoOgrc4P6?= =?us-ascii?Q?eYkz5MFHPB2LyXvEs2U7s6lGxcmRz2eet4Gb6DeaZHwyx69Wfa8fqNz9lJ3c?= =?us-ascii?Q?hkB7bK011Mp1yt2/3SiJAHVJoX8fwrs5QhwnsGgMyK6meMa2tG5MYhv6ybEV?= =?us-ascii?Q?r+4fUkTTXMrrGiABkuQshiHBdchKXNCj0ssuxpOCDeCqQ4iQOJsNCrEX3lrj?= =?us-ascii?Q?ob3cE56M1wWYyN1f+tCqiePvm+bsyTtXPrOypjcZhuvY8roV8dV2xVJOmcxi?= =?us-ascii?Q?XU/lWNFA/sHuZwsrqOoHVKeuduA/VuAU/N3Cxmo78DejWs/xLI728pTkoJzo?= =?us-ascii?Q?cVOrAvo0AS4UqX6+9SIrYf+2ZZlqcmPGP24FkQ/z7WQ9umaeK6yjwE02jD6P?= =?us-ascii?Q?rwXrX7BR1sjHcdJCB7/RD6JTExTuV+geHMY1GZH5TuQSTn/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SbFXGXhYYMNEDsZKQGYIRRyDf2k0iWPBfb8JWg3lh26+9NUl?= =?us-ascii?Q?RO4DSqPQQjKretrvo9gtRcdbW5YiUn7BfgG5zVyq1+aSi1L4wUjxPp96NatA?= =?us-ascii?Q?wYc3mLTdKBg+vDvCm+lENaeMkbbK26K4SFpYltXgnJLshbX/T8cIDTAhANex?= =?us-ascii?Q?kHYIG+97HBcMzuWQW0DyrINRF164/bCSVyELm6nmUBlUECsQ5YTUH9f/R/jk?= =?us-ascii?Q?3cAaL3QeuW/vlfcVidywSdJa5I6mweEkx2fTPRn1?= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6103.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 914abae6-1975-4ac1-33bf-08dce82b7661 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2024 06:27:34.6777 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0oLa6j2pgrXo9rBwCxzbWKKod/1nZHdYV7UpX5bNca8ztdrVoIk/Sdket4d+JJ/gcTMYDHu5w+cPKaqaOrO7hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6180 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > On Oct 9, 2024, at 00:47, Stephen Hemminger = wrote: >=20 > External email: Use caution opening links or attachments >=20 >=20 > The pointer bdev is allocated with rte_zmalloc() and then > incorrectly freed with free() which will lead pool corruption. >=20 > Bugzilla ID: 1553 > Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample"= ) > Cc: stable@dpdk.org >=20 > Signed-off-by: Stephen Hemminger > Acked-by: Chengwen Feng > --- > examples/vhost_blk/vhost_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_bl= k.c > index 03f1ac9c3f..9c9e326949 100644 > --- a/examples/vhost_blk/vhost_blk.c > +++ b/examples/vhost_blk/vhost_blk.c > @@ -776,7 +776,7 @@ vhost_blk_bdev_construct(const char *bdev_name, > bdev->data =3D rte_zmalloc(NULL, blk_cnt * blk_size, 0); > if (!bdev->data) { > fprintf(stderr, "No enough reserved huge memory for disk\n= "); > - free(bdev); > + rte_free(bdev); > return NULL; > } >=20 > -- > 2.45.2 >=20 Reviewed-by: Chenbo Xia