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 CB85246211 for ; Thu, 13 Feb 2025 11:01:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C627F42ED2; Thu, 13 Feb 2025 11:01:02 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 330B142ED2 for ; Thu, 13 Feb 2025 11:01:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739440861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zlqq3QooiaeMhrLj2BKnkydHXAihpQb30+jQItFXLjA=; b=WaCNwOjG/mky7jwTGLpgvr6PEL/9lffXZ50e15F8egE8/v6txUsqJlHsQI/D4cLtzOThmf cO1Y7mVfJZbI8GXK4y4MRmXRmU6X5rEA8aGBCBi4Zj2d6nTol2MD5o7oAhZmG5JD4uAtxm 8myyPKqbQXIxn0AiYozlg+Bn8w7JaUE= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-94-rwTXc4LIMhqx07rP0GbhQQ-1; Thu, 13 Feb 2025 05:01:00 -0500 X-MC-Unique: rwTXc4LIMhqx07rP0GbhQQ-1 X-Mimecast-MFC-AGG-ID: rwTXc4LIMhqx07rP0GbhQQ_1739440859 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6407619783B6; Thu, 13 Feb 2025 10:00:59 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CB1A41800360; Thu, 13 Feb 2025 10:00:57 +0000 (UTC) From: Kevin Traynor To: Rajesh Mudimadugula Cc: Akhil Goyal , dpdk stable Subject: patch 'crypto/virtio: fix redundant queue free' has been queued to stable release 24.11.2 Date: Thu, 13 Feb 2025 09:58:00 +0000 Message-ID: <20250213095933.362078-33-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tVBjVT_IEX7STxnPBAggupDli72PlrhATAWyvprrUxg_1739440859 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 24.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/17/25. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/df76613de641c3c8c4f11c714985cc25cae1e270 Thanks. Kevin --- >From df76613de641c3c8c4f11c714985cc25cae1e270 Mon Sep 17 00:00:00 2001 From: Rajesh Mudimadugula Date: Wed, 27 Nov 2024 14:12:48 +0000 Subject: [PATCH] crypto/virtio: fix redundant queue free [ upstream commit 89241aba832c044a9efb99329cfaa9faff8a6c4e ] Remove multiple invocations of virtio_crypto_queue_release, and set virtio crypto queue as null upon free to avoid segfaults. Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops") Signed-off-by: Rajesh Mudimadugula Acked-by: Akhil Goyal --- .mailmap | 1 + drivers/crypto/virtio/virtio_cryptodev.c | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.mailmap b/.mailmap index 58811dac34..37e2087ec1 100644 --- a/.mailmap +++ b/.mailmap @@ -1252,4 +1252,5 @@ Rahul Lakkireddy Rahul Shah Raja Zidane +Rajesh Mudimadugula Rajesh Ravi Rakesh Kudurumalla diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index 643921dc02..98415af123 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -479,8 +479,11 @@ virtio_crypto_free_queues(struct rte_cryptodev *dev) /* control queue release */ virtio_crypto_queue_release(hw->cvq); + hw->cvq = NULL; /* data queue release */ - for (i = 0; i < hw->max_dataqueues; i++) + for (i = 0; i < hw->max_dataqueues; i++) { virtio_crypto_queue_release(dev->data->queue_pairs[i]); + dev->data->queue_pairs[i] = NULL; + } } @@ -614,4 +617,5 @@ virtio_crypto_qp_release(struct rte_cryptodev *dev, uint16_t queue_pair_id) virtio_crypto_queue_release(vq); + dev->data->queue_pairs[queue_pair_id] = NULL; return 0; } @@ -761,6 +765,4 @@ static int virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev) { - struct virtio_crypto_hw *hw = cryptodev->data->dev_private; - PMD_INIT_FUNC_TRACE(); @@ -777,7 +779,4 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev) cryptodev->dequeue_burst = NULL; - /* release control queue */ - virtio_crypto_queue_release(hw->cvq); - rte_free(cryptodev->data); cryptodev->data = NULL; -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:38.153245255 +0000 +++ 0033-crypto-virtio-fix-redundant-queue-free.patch 2025-02-12 17:29:34.301945637 +0000 @@ -1 +1 @@ -From 89241aba832c044a9efb99329cfaa9faff8a6c4e Mon Sep 17 00:00:00 2001 +From df76613de641c3c8c4f11c714985cc25cae1e270 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 89241aba832c044a9efb99329cfaa9faff8a6c4e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 8524952d24..e428ed3dec 100644 +index 58811dac34..37e2087ec1 100644 @@ -24 +25 @@ -@@ -1253,4 +1253,5 @@ Rahul Lakkireddy +@@ -1252,4 +1252,5 @@ Rahul Lakkireddy