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 1FE0AA0544 for ; Thu, 7 Jul 2022 09:56:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F14EB4282E; Thu, 7 Jul 2022 09:56:24 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id D5856406B4 for ; Thu, 7 Jul 2022 09:56:23 +0200 (CEST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 8737A40AB2 for ; Thu, 7 Jul 2022 07:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180583; bh=FjxKMY3VnlQdsmCLxq9peAYDkGxYw3cnhYAxKOqVCNE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A367D7fwDKdjPmqipmIueeU/Gt4SI+zJ0shtMN4Y66XJrwWF4R03rTsv//JUAWd3L BxNcAq3JMfcmTnF6hOPOPHBkXDzUBbnE+djhh1k/jb8g3q3y4nEXSgiq9TuLTiK2Bz EsA0Mgs452hV20O8u1x/4zEix1sxBSP5So5bu3yHnYhohTGNUSf2ueGKiayC6dP048 zJvX63WmpWMOWvo9o1+aUx26MgIWJ7ih46ZSNDKUtHvrbujBZyedeSdSLdSdMOr6zX tUMDjayffnoH0tRjG6loGiOeYjujNp38vnmsJYlyOSCKD4bWV4Ry2BDgGa13YKmIZ5 cQerY3H0axsBg== Received: by mail-ed1-f71.google.com with SMTP id w13-20020a05640234cd00b0043a991fb3f3so933407edc.3 for ; Thu, 07 Jul 2022 00:56:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FjxKMY3VnlQdsmCLxq9peAYDkGxYw3cnhYAxKOqVCNE=; b=dSkN1Pj3kws0+10Jeu6zljLCdvATu0mGB7lgrLK3xtssmQVqPY4apwlpiWEydw2lVh stDBtx7D30zikm3odYwCptFXShxIWTuA6qUV7R5CeAITM1qqJSy9X4ZbcPJyVcfIOWQ1 6Ey5auPWXIOv2Y7jcrMdRzJkrZOa/OvFsboi/S6Dn9cvul8ttxn2NcgLDn9COaj7W71e 2rnoI5Q2K461U7/qk4zz/2wQ1nnpJnDuNo0rFlieX924Us/E7J5m/sI6iHCGzarkllVq Hdk9YjG5NVXNAfZMWUPJJUUAFSrkMC0pVJCUpiH/up1PVVMJJka6m7kosa0cH9bvcZYT eakA== X-Gm-Message-State: AJIora/s5sHX2mEW/25JnCu3mqzGtu+9lfe/JNXDorEvHhWO6/yQ9uw8 i58uTqX/utlJYzSttMjfx0Gi/SNcz8zEKmEphj6ypceA0X5iv6WNyN0lFEj+0ClSLXMewoRbA3c 9gBHf16XrVtDBibr3vyXUPYRe X-Received: by 2002:a17:907:7242:b0:726:f510:4bfa with SMTP id ds2-20020a170907724200b00726f5104bfamr42897924ejc.219.1657180579907; Thu, 07 Jul 2022 00:56:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tgOPEQ6gviiQ5bSkj/9R/iV+T6M5+lLkvONMVRZbeJPvnlg+xI1xwz9Zn+3R9ngvHVX8kA8Q== X-Received: by 2002:a17:907:7242:b0:726:f510:4bfa with SMTP id ds2-20020a170907724200b00726f5104bfamr42897906ejc.219.1657180579651; Thu, 07 Jul 2022 00:56:19 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id jz2-20020a170906bb0200b00726314d0655sm18522363ejb.39.2022.07.07.00.56.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:56:18 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Maxime Coquelin Cc: David Marchand , dpdk stable Subject: patch 'vhost: fix missing virtqueue lock protection' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:14 +0200 Message-Id: <20220707075522.194223-19-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/5189c8ebb88cd88996d52c2d51ec4e2350df5891 Thanks. Christian Ehrhardt --- >From 5189c8ebb88cd88996d52c2d51ec4e2350df5891 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Thu, 24 Mar 2022 13:46:34 +0100 Subject: [PATCH] vhost: fix missing virtqueue lock protection [ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ] This patch ensures virtqueue metadata are not being modified while rte_vhost_vring_call() is executed. Fixes: 6c299bb7322f ("vhost: introduce vring call API") Signed-off-by: Maxime Coquelin Reviewed-by: David Marchand --- lib/librte_vhost/vhost.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index bb86e02d1e..0b88fc1a49 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -1248,11 +1248,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) if (!vq) return -1; + rte_spinlock_lock(&vq->access_lock); + if (vq_is_packed(dev)) vhost_vring_call_packed(dev, vq); else vhost_vring_call_split(dev, vq); + rte_spinlock_unlock(&vq->access_lock); + return 0; } -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:12.010787775 +0200 +++ 0019-vhost-fix-missing-virtqueue-lock-protection.patch 2022-07-07 09:54:10.817823702 +0200 @@ -1 +1 @@ -From c5736998305def298e26f8fa73b9995f184fc983 Mon Sep 17 00:00:00 2001 +From 5189c8ebb88cd88996d52c2d51ec4e2350df5891 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c5736998305def298e26f8fa73b9995f184fc983 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - lib/vhost/vhost.c | 4 ++++ + lib/librte_vhost/vhost.c | 4 ++++ @@ -18,5 +19,5 @@ -diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c -index cf4bac277a..df0bb9d043 100644 ---- a/lib/vhost/vhost.c -+++ b/lib/vhost/vhost.c -@@ -1291,11 +1291,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx) +diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c +index bb86e02d1e..0b88fc1a49 100644 +--- a/lib/librte_vhost/vhost.c ++++ b/lib/librte_vhost/vhost.c +@@ -1248,11 +1248,15 @@ rte_vhost_vring_call(int vid, uint16_t vring_idx)