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 9CBEDA034F for ; Wed, 10 Nov 2021 07:38:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 963D440142; Wed, 10 Nov 2021 07:38:21 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2081.outbound.protection.outlook.com [40.107.93.81]) by mails.dpdk.org (Postfix) with ESMTP id 18D0440142 for ; Wed, 10 Nov 2021 07:38:20 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmSWhYTYDEqpdAhCTBZFiRiVXwsqXhyWNyCgLkz0b4BZIjN6ZRkous0dufqW+s4EcvfpRTNXP53TUofJEXzmVHz77V4rgeLrezm3vWRG1LXpk73cyGf2FzNa6jZn4Rd5J5TFlgzAunNmCFBHAHz1yBk+FRVVQeJ8hpMuVtjb3d8v21a/tjj3QrmmeEpfp1E7BrSAwutPXuqr6QTbVtvdqUwGm9YezoHSjTniEZAzLy2IyMmcPU8y9pgm61g9A+3rgxNlRM1w7vKcTEnY1T7zk73b+vwr6NYaERSmsuEZtgcd2s7uGIo2XDmQm+Z1hEBFP8K+McQHJZLdwtpDKpgc7g== 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=aw2AmDkrIPq97Tiehk857GUj0nFYotGFvm+N/IAHvKU=; b=nWPiIL2CGj/tE5EYPFTsms+WZqfxpI/QXG+A2vcm3vtg0L1DBpri6fi5JqsiFpVr47OC9x5zQ8o3kmYNwcTLDOSv3bUTk/TfsMu0jdbXZNgaWoFofx9QmQu0VbrwSX7GeTPDTx4za1k3ffo7W2ksAYuEyKAHO5agOZAjr03ZucgydWqUPP7hgAuKIyDbopHbV5dbJQ08B4OUXnsMys7Sn6q5P9VyQFcIO+0gtjVClR40R9NgTmywUFavfxLxhGefdACCUfNfrwvWMcr26tMnS4zCd5K+vYuEkevT6HtujIk2T4KA+v9/8C8V6RdjLqarDEWwh9VJifO5bAB+aN0rSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=aw2AmDkrIPq97Tiehk857GUj0nFYotGFvm+N/IAHvKU=; b=ZXiIPatuiXhxS8XFIPiBlDQnmwKeqzqXiePD61AJ9CKFIt7/j64BHqICktMxgcqxYKXmQlrqlxhnVt4LgpHZ6e6LJqOiOhu60SzUTEZ52JsDIucnMcGCLxPNNAFqiLdFBn42vUVhU8/sZ3rQAjBoQXegeQ86YarIRfEBSr+zGB0MmmI7oAMZauPKeb0vYNHek/OAulHXREb5f5b3h0QIe9KDI2bM5y40Gj888xM1SCWYjX7MdrR1mvtVIv3l3vPb3FhXtngs5xDDtBeWXxJ5gvG/g4P1knVA5rFq/7Dfpm6Zg80e2esrzjtVYGtsrN5EUTDdBDLHS538f0I3AUaYzg== Received: from DS7PR03CA0297.namprd03.prod.outlook.com (2603:10b6:5:3ad::32) by BL0PR12MB2419.namprd12.prod.outlook.com (2603:10b6:207:44::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Wed, 10 Nov 2021 06:38:16 +0000 Received: from DM6NAM11FT059.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ad:cafe::8f) by DS7PR03CA0297.outlook.office365.com (2603:10b6:5:3ad::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:38:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT059.mail.protection.outlook.com (10.13.172.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:38:15 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:38:10 +0000 From: Xueming Li To: Gaoxiang Liu CC: Luca Boccassi , Chenbo Xia , dpdk stable Date: Wed, 10 Nov 2021 14:28:58 +0800 Message-ID: <20211110063216.2744012-55-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 175ca765-72f0-4570-3d40-08d9a414ad14 X-MS-TrafficTypeDiagnostic: BL0PR12MB2419: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AKqd5OKnGxLBWHBgoFuxQ0jZo06/lqqc3exUo/81XT+qVn7U5euzsLa4xH/N2s02z8uTGMYK0Jn/cZIi4ZINwt00PNvpbVecy6B4sNSXv70zfpRD1CE0+GVdZT1IUpYLRMKCz9I0q5LmoOK8mVp6AVtgqDe5oAN3RBEYH98LyjJs0VB9CfxeXP6ddIwXhnvdfr/QYWa2tZnQm0i2pF84AktcmODc6rPyEe30uofAlW55E7CjHaw46PF5GltkLok5sU5fozhuk4gMOS7rObRsDBNTSj9T2tup5x1scznjdnHN+XGNDpqbAY8lTBE2v2v9NxBeKisyfFYYzvPhHxV8aoYvGs1qiHSz4tlXGkHoyn+9IrvVVT6zDWdzaejo/l8cf61Kea17cIqAswsteYdL14NF9POziSzHIkgX08kT5wBoCGNwW0QcWK2iv0bSdO4mSik2y7EcGzQYbkuF8WKKoPabIdMv38OVKbiWbu+INnXQjupEfIbtlJG8MgfJU330hLMnicBLF6Q1aSXoTs8yV/cwW/hAG73Pi/AQS+snjcmG+dq7no6OJHs5A93+SUUbIT/JOKUFJmWjJOGw/KZ/TSIEYE85ZMJjMYTIGuo7cDzYe6cXGY8LucKx6xJtSHEh4cKZq+X6MPa4vx9ku48Z9WkkLnFV1s64BHRlm9Zf5XmDtAd0ZlXPESQweyjeOtT27W9QR1bfkKgFb2WYfAPC5dVUSBtIIVFw4iE33NrVolOGsB80uG/Rk//JMJMeZLVQhQUhTqEl2gOSsukvo8/aUZKqkeljSXLau32s4fnD97PgPqzlmGgT4Zm8l9vXHX28P7gp1YFJD9gp2EBw14RFag== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(82310400003)(4001150100001)(26005)(86362001)(4326008)(966005)(54906003)(70206006)(16526019)(6916009)(5660300002)(8676002)(70586007)(8936002)(1076003)(36906005)(2906002)(508600001)(7696005)(53546011)(186003)(316002)(2616005)(6286002)(7636003)(47076005)(356005)(36860700001)(336012)(83380400001)(36756003)(6666004)(426003)(55016002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:38:15.8072 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 175ca765-72f0-4570-3d40-08d9a414ad14 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT059.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2419 Subject: [dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Thanks. Xueming Li --- >From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001 From: Gaoxiang Liu Date: Tue, 31 Aug 2021 22:39:51 +0800 Subject: [PATCH] net/virtio: fix repeated freeing of virtqueue Cc: Xueming Li [ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ] When virtio_init_queue returns error, the memory of vq is freed. But the value of hw->vqs[queue_idx] does not restore. If virtio_init_queue returns error, the memory of vq is freed again in virtio_free_queues. Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage") Signed-off-by: Gaoxiang Liu Reviewed-by: Chenbo Xia --- drivers/net/virtio/virtio_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index cfdeb40160..25f1b951f9 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -647,6 +647,7 @@ fail_q_alloc: rte_memzone_free(hdr_mz); rte_memzone_free(mz); rte_free(vq); + hw->vqs[vtpci_queue_idx] = NULL; return ret; } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.502662683 +0800 +++ 0054-net-virtio-fix-repeated-freeing-of-virtqueue.patch 2021-11-10 14:17:01.807413276 +0800 @@ -1 +1 @@ -From 5d903aee8ad0243320a23d0e1e7b34b96024e007 Mon Sep 17 00:00:00 2001 +From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 061d02f666..51fa85b078 100644 +index cfdeb40160..25f1b951f9 100644 @@ -24 +26,2 @@ -@@ -632,6 +632,7 @@ free_mz: +@@ -647,6 +647,7 @@ fail_q_alloc: + rte_memzone_free(hdr_mz); @@ -26 +28,0 @@ - free_vq: @@ -28 +30 @@ -+ hw->vqs[queue_idx] = NULL; ++ hw->vqs[vtpci_queue_idx] = NULL;