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 E7BE843D06; Wed, 20 Mar 2024 18:14:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61AFD41132; Wed, 20 Mar 2024 18:14:49 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 29E5A40A6F; Wed, 20 Mar 2024 18:14:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dC5hZocbBkBRcM1sUZnr23986hJLopfroJJGCEwucD4G9wSoyu2r/uKt6X/nAO7y/USUlfwBEvIZkG+WryKs6XE5qSN+YKPXKQM8moS5ePa5mV9LZe9e2sr8JEo2yND3hMhcZ9qoxDh1GixeZkS8uMTHMhX/yEReoLb1HY1qYn7gSg+Fqj4LEUXujseeTebCplvD6sC7qjPABOaEDb+wmxJnyPdXGFLmUZ5kDuyyjeQmIRcM42QH87FtNteoiImmhfYkdQbbFcSzjhvdGEdlltqwXmoEgfWRCGur29a7KMmuTeitnvTcy2u5q1KQr/PUZMeWpUl6g+RJUg35h07mbw== 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=xmmHhOHgYpfYE7b243tlwwTUfOvycNaj4i5pskLNl/A=; b=I3x52dyqZwF30ppVDfDTy0sbkHxcDrAZcZvow3lOWaMeiEIh1ptYSTUj6eQbUWfJf9AXhI4VE2VNeDDPHLgIpQXBkSqg/VE7bQscY2RoA+nVbVMJt4ZpVB/aIMLYaUnGzsKGguDOm6rrd6MU9e2UVI58TZKrtCAAXZzGaZ5Y0ECKjzQt4gLu7SGjIgpYr7h/tUxb5nBSZDrRY2mg61X1JR72LjJc1mhWZlk2XePnowtH3ELAX7JYZRZtTZ0bSf56akNzXAVSCDLP1DQLwqS0lvdsKVRUHWot3ruiRa6Av+PX/VG96FS1Z+r8oi3zT8A9qPdFLxDED9hn/UxUfRykIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xmmHhOHgYpfYE7b243tlwwTUfOvycNaj4i5pskLNl/A=; b=2AMCwugbtiCQ9qfHDXQ2BTmopPkuZAbVFflI86BuZ72swrAE2WXAJut6Ne0YPb7uWI6buKzKDMcIxBVG2xHKdka18uRyMAtamcJMRa0kwIeXkju2Eoil9bqX6rR+uyt6/9aczw7as42zuUsSj4FSgWaieMYupztHEI0078TmBH8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5891.namprd12.prod.outlook.com (2603:10b6:8:67::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Wed, 20 Mar 2024 17:14:43 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%5]) with mapi id 15.20.7386.031; Wed, 20 Mar 2024 17:14:42 +0000 Message-ID: <7df0adea-a999-4e7c-8d8c-fc5a5cd46291@amd.com> Date: Wed, 20 Mar 2024 17:14:38 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/ena: fix mbuf double free in fast free mode Content-Language: en-US To: shaibran@amazon.com Cc: dev@dpdk.org, stable@dpdk.org References: <20240320145232.535-1-shaibran@amazon.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0/kEp49aIUhkRnQfmKmNVpcBEs4N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535-1-shaibran@amazon.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0224.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::20) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5891:EE_ X-MS-Office365-Filtering-Correlation-Id: 79f2d3cf-c008-4fa0-053f-08dc49013b75 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gVQfa69njCPDYjL2cTQ01q2mThnxBJuLE42s64dw/aWKO/LY8EvedbNpkQq3mW/KaLifzTpqUTf+13JZn194O1NcnYmqT+CIxBfyN+KGPzIKVf82UWmzuRiWLk36jlfvkjIh44abVu7FboGQHNU4EkJwohvw4cJyY7KSlhCDrFLkLlL0gUfPFR8Xh3wp+oTAo/SpBUGKIPJZMEywgXaiH/F33oHW+LveSo1M7fVTdILIkJP1/mGALaqg7JpbzGAaABR0e0tabg+6S6Bav7YHLyBXvFOLq/t2//6TZ3de0vYdxbVCxA6I83PD4ocMnXdc40g4w3wuyWxChaR8Z5/2U4kgsm7E7WNc7lSxKV/Th27R7VZvjcE8CnWZFPeSNJdVLn67rPBXd61NHKmPi4Aj96VOt8LV3jGgsAgN5U2gMp5fT/ERv3a+H18t2qHxnqKY4ztqRdWfz7as47eq4+wHP0B7vpoCYcpIpaD7eRd62+Uon+BY5oEqsrp5RfrOw0Qs81n6/rA+urVNddjwmdvx935b0KyU87tRFWbAO2O1GELNlR4xC+m2+Lj7+rWZqeZRynqgYcvmUNo/tuL+Wjq/7n1QFTeFeiKfhtqMjE30A4YjDkcQgMwPUbdnhDPDBnc6Jhh0+CvBynwWZf0eNjbpN6fp9T2QS5aqSuNbOV1nYjY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Y2o4ODBrbDU5NGpHcjlsZndFQlZPRUxEN0dUejBxU3NKSkw1dVMwMFVDL0Fx?= =?utf-8?B?dFMyaGJPN1Q3R3ZiOWZQa2UvZjVIbVdXWllxRndJWVVzbXFEcG1PQkdtYmpO?= =?utf-8?B?R2YyWDA4ODJhM3hDK1UxL1VRclZtQThxLzQ3N0NuRyt4RUlPZU9nenc0dW9n?= =?utf-8?B?ZENCU25MM3pOdzNrVmF1SlluQzdoVDlNMFFkNXZWWVZRUVZBTWZwcE5sSERZ?= =?utf-8?B?SFcvUGtZTWpxN3ZiL3hlMGNxNHlUbjNUSlJHVG14ZHZSa3NUZ1NnaGxDQ1Z4?= =?utf-8?B?aXNFbkRpUEg2cnU3TmpDRnFmRGYxMUtqdnVCdi9OSXRjb0hrZGxlOU02QXY5?= =?utf-8?B?RVVzMnlITmc1ZERxMkJDWXllU2RCeDh5Vkk1VDJvQnVMN3NYV0RnQ1MzWnl0?= =?utf-8?B?ZCtrYWJjZjBJdGtOK1dwd1R1T2tYd0VKVVZzeUdYQndxYUVhSVlzc0psT0hv?= =?utf-8?B?UGRPWFFtbktlMUFNOUFsRUNHcWZxVGhncDhrOUZaNjNRMTNNWnpiaHFJd0Vs?= =?utf-8?B?QmZzTU5TdnZjMlFxSG9uN01VVzhBZDZjd21HWDN1allJQzVkN2kvWDZxbCtE?= =?utf-8?B?Y3JJQlg0SFhJTWc5RmR1UEdIeWFHUEltQThIRm00RnlmRzFXU3BPbkFQTE9r?= =?utf-8?B?dEY0aFEzSlJ0QkxZbGh5N0FWSkJhTWRlUWg3T2VpTE16Nmh1bzFqVG5udGV6?=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HVZTEtVbmJURUVk?= =?utf-8?B?bGxJSTNEL0FJK0M0cldoUE8rN0VXd0ZxVERHU2dOaUpOQklWV0Y5ZzNEdkxK?= =?utf-8?B?bEgxTmh4MnQzM1dEVE5JTHZ5c00yL1VPUXAxT2cwMm1CWStvd3FUK3JoSkVX?= =?utf-8?B?UWdIcUVVbjdVUGtzRzFGbXZVVlpDdW9zZ3E4WWw0NklONlRBVnMybHo3aks5?= =?utf-8?B?SjRSRnFuRTVSNXduaVpobW4ralpzTVoraFY4Si9YaUEzbHZMTkNiSGIvNmln?= =?utf-8?B?SFN6a0NrbTJqZ1MrQng1SFlOZnlEelFrVkZjZnd6WnZjRlpKSitJc0lzemRn?= =?utf-8?B?SW9vUkI5bDBtSGltaWc0ajdmOUNjUy95RE5QSnRZRzNobmdXMk9aM3ZacUxL?= =?utf-8?B?ZEd2bWxpVTBNTlBTdDZ3eXJuMitxRS9SM1hCSWZOdm1PelVHVGJOWHlJNkxC?= =?utf-8?B?dlJNd1R4NTk0TGxzd1luSlA0WmswYUZ0NWZRUTY5aVZOQU94NDBOaml4QXVy?= =?utf-8?Q?P1NAxvgisYaGRks+8HsOk3FP1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79f2d3cf-c008-4fa0-053f-08dc49013b75 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2024 17:14:42.2844 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nVZ33l4YV47AerwmkyMn9PwyXcr9dsz5Z3si5Z+5wb1dpCr08WJPZRpDDJ+yMbaV X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5891 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 On 3/20/2024 2:52 PM, shaibran@amazon.com wrote: > From: Shai Brandes > > Fixed an issue of double free of mbufs which is exposed > in mbuf fast free mode when handling multi-mbuf packets. > > The faulty patch mishandled free of non-head mbufs as it > iterated over linked mbufs and collected them into an array, > which was then passed to rte_pktmbuf_free_bulk. > However, rte_pktmbuf_free_bulk already performs an internal iteration > over mbufs that are linked together which led to double free. > > Fixes: 89b081e154c5 ("net/ena: fix fast mbuf free") > Cc: stable@dpdk.org > > Signed-off-by: Shai Brandes > Acked-by: Ferruh Yigit Applied to dpdk-next-net/main, thanks.