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 424F8A0C47 for ; Mon, 26 Jul 2021 15:54:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35B3F410F5; Mon, 26 Jul 2021 15:54:41 +0200 (CEST) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id 9205540F35 for ; Mon, 26 Jul 2021 15:54:39 +0200 (CEST) Received: by mail-wr1-f46.google.com with SMTP id l4so11199318wrs.4 for ; Mon, 26 Jul 2021 06:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nsMEAbyf5Zy2QtrQAwQavgsulFnPXkkRE4N0LmcwHi4=; b=DhLH7kY4gWmYU+CI5YxWVsK4IgzRn/rZPt67/USI4nYAc7LJdcrJn/bFnhlyy36qVm xr1JZWBsgum79F+lhRg7gC6+0cLBXHoF5Akm4U1d81N1j9iWFwDmcffOuVqeUSDkJID0 JupO7Y01hP1dLFkKpuQUl1bV0Xn0UrhHufoV+lhl1F+iJay1fSTT8KlOPGh+aSiRdn6B RkReszkUwdyaVz+rE/Jwn4dOX4mHu/kZZgA1k81MRy1N61ZK8kScgOGnP7fWAxX2Wvm0 nmVdBpZ5oBsjAJMUqNu3NR9LI2vnuUn6eu//GTW1PRiBdFeVrTWFC7zhO3tXxqd/4O+X THGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nsMEAbyf5Zy2QtrQAwQavgsulFnPXkkRE4N0LmcwHi4=; b=lWC6vfjDUZJoiUCCTl8XO+UZLOJmMhOIZ4XTDnGjzTtLerN6WFRHMHVw3hPAtLWFqq JVwgoVgCPilIYYyxWfaIqWLHHrqnmdQTE1CDTBgK4q90qCDrdJTgblWRRXMWlK507CSW Y0qBM4AtJ0RG9vYuB+uNadal9gGHZ9ZMw75IPKYqMaO7ZVnLfOq3sGv7y2NTWqkDseOd W8WUK0vYGRbK8EMmzYG8LvcTb4cMs3p1+zFSB2J67IGGOqK49U/i7EGtuPeyZgWJ6oCg zfy17uHcVbP9gGHWLQQNWbRjSHPg40XQP6iin62PrylITSfpHEROV8JqVvU4e6wopmCV EKnw== X-Gm-Message-State: AOAM531YsFe2bFqiHYqO2vV+q+3o6tfAJa3mNKL9I7Wg84x9xFwGGVRM uwYpmcr2hvOf8WXhqo3Gm/I= X-Google-Smtp-Source: ABdhPJy07U+AI6llT2u25nYn1k1916Qy+QjxFFU2TJsGo96HaRW6LqFO4l4JX8MzwdKYSrWupypdrw== X-Received: by 2002:a5d:4d07:: with SMTP id z7mr20563906wrt.244.1627307679406; Mon, 26 Jul 2021 06:54:39 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id p3sm6651938wmp.25.2021.07.26.06.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:54:38 -0700 (PDT) From: luca.boccassi@gmail.com To: Jiayu Hu Cc: Maxime Coquelin , dpdk stable Date: Mon, 26 Jul 2021 14:52:47 +0100 Message-Id: <20210726135322.149850-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix lock on device readiness notification' has been queued to stable release 20.11.3 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.3 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/28/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Thanks. Luca Boccassi --- >From e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Mon Sep 17 00:00:00 2001 From: Jiayu Hu Date: Mon, 19 Jul 2021 11:00:45 -0400 Subject: [PATCH] vhost: fix lock on device readiness notification [ upstream commit 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 ] The vhost notifies the application of device readiness via vhost_user_notify_queue_state(), but calling this function is not protected by the lock. This patch is to make this function call lock protected. Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications") Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 61ed221395..9b1a6d7697 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -2892,9 +2892,6 @@ skip_to_post_handle: } } - if (unlock_required) - vhost_user_unlock_all_queue_pairs(dev); - /* If message was not handled at this stage, treat it as an error */ if (!handled) { VHOST_LOG_CONFIG(ERR, @@ -2929,6 +2926,8 @@ skip_to_post_handle: } } + if (unlock_required) + vhost_user_unlock_all_queue_pairs(dev); if (!virtio_is_ready(dev)) goto out; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:17.094563335 +0100 +++ 0024-vhost-fix-lock-on-device-readiness-notification.patch 2021-07-26 13:53:15.845292538 +0100 @@ -1 +1 @@ -From 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 Mon Sep 17 00:00:00 2001 +From e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ - lib/vhost/vhost_user.c | 5 ++--- + lib/librte_vhost/vhost_user.c | 5 ++--- @@ -20,5 +21,5 @@ -diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c -index 031c578e54..31300e194f 100644 ---- a/lib/vhost/vhost_user.c -+++ b/lib/vhost/vhost_user.c -@@ -2995,9 +2995,6 @@ skip_to_post_handle: +diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c +index 61ed221395..9b1a6d7697 100644 +--- a/lib/librte_vhost/vhost_user.c ++++ b/lib/librte_vhost/vhost_user.c +@@ -2892,9 +2892,6 @@ skip_to_post_handle: @@ -34 +35 @@ -@@ -3032,6 +3029,8 @@ skip_to_post_handle: +@@ -2929,6 +2926,8 @@ skip_to_post_handle: