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 86958A0547 for ; Tue, 9 Feb 2021 11:36:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C43740147; Tue, 9 Feb 2021 11:36:58 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id B7C5240147 for ; Tue, 9 Feb 2021 11:36:56 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id h12so4712301wrw.6 for ; Tue, 09 Feb 2021 02:36:56 -0800 (PST) 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=oIj3cM8Xvsmb5YdyYAQwxLnhbnrUsY6sUbH0JBidzQw=; b=q5OqFxJd+Z9fvQwoiDeaDeuOzDcdZ0MiTGY7SciYOqfeul14qN0uZeYv7cdDIj6vVs KbzarS8oGSFNusClimKozqQxHtVjNlTopBI1pCgwAGk7JITHyHxf2KHhGzsst+0qkvjF M0veoaEdzPJ6HS/vMMsJZFCw4M179sz2VISdVV7IRiMXEBNeWKqjK5IyEmflqB/HFzVI bgkbu5kOeHb5nAGR4xiZLlnvWHYTsbwzb6e+ZgIkuA/LUdIC2XGqYX3/QStWYwOepOjg R8HMC13uFfud7jX5ZNlvbyie4gkQwAIohwTfTt6zggsYF9B5iDFwRW+otuVP0F1x4+mj qi+w== 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=oIj3cM8Xvsmb5YdyYAQwxLnhbnrUsY6sUbH0JBidzQw=; b=dOKZDtRy0R1pyE2K86GVBgzfKubStNOWe77h+vHJSvTZNwA5QaNH+4HXsM/PiI4dfp dTW6lOlk6XdBSKbgnrasNSb95fWaXNBdgnJxscQwVp8eKd69AF8XegpgcmSP4axUr8qw KY3tz7H8JBDz8OVSeZEe81kh5kVqVACzIFVuYZHJ7arA3ZvCm5Ky4drLLNTdzaHZzrfw NLWY4EZ+4snr3e3uXEKwKmYW4JMFZ2AbVOn/wGY6xclBV3aoM1maoy2QpijmkMBpwdbQ 6OIWGo8ZDUK5WqqnWKR9H6OlhRbttx8viCApBOT3Q4bbl5UgPu+eZNt7FBTZBgiCCARH NYAw== X-Gm-Message-State: AOAM533dzfeJ2s09AMrFPReMpp9eIjf1enQFtPH3kC6iDnZxKwmpIU+y qWdyxIOuv9nxeiygZK4SPDc= X-Google-Smtp-Source: ABdhPJw9gs52VVtacFbbdN0gXHRLu3rak34HDs3dTT/Lns1o3t5hT15J/GbIIZQ+ON8bmv8zYS1pRg== X-Received: by 2002:adf:e5c6:: with SMTP id a6mr24937856wrn.400.1612867016516; Tue, 09 Feb 2021 02:36:56 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q15sm7777654wrr.58.2021.02.09.02.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:36:55 -0800 (PST) From: luca.boccassi@gmail.com To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Tue, 9 Feb 2021 10:35:24 +0000 Message-Id: <20210209103529.466775-26-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103529.466775-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210209103529.466775-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: validate hash Rx queue pointer' has been queued to stable release 20.11.1 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.1 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/11/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/b7a6f0c9edf0f660bff5951095452c67a21e9de8 Thanks. Luca Boccassi --- >From b7a6f0c9edf0f660bff5951095452c67a21e9de8 Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Wed, 3 Feb 2021 12:09:09 +0200 Subject: [PATCH] net/mlx5: validate hash Rx queue pointer [ upstream commit 207b4d06c33896ac723139b3af62bf710ce082f9 ] Implementation of mlx5_hrxq_get() tries to get pointer to a hrxq object, by reusing an existing hrxq, or creating a new one. There is no check of the obtained pointer, so using it might result in error. This patch adds check of the pointer before using it, and return 0 if the pointer is NULL to indicate error. Fixes: e1592b6c4dea ("net/mlx5: make Rx queue thread safe") Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index e4cbe6430b..1a5cf99d51 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -2424,7 +2424,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev, return 0; hrxq = container_of(entry, typeof(*hrxq), entry); } - return hrxq->idx; + if (hrxq) + return hrxq->idx; + return 0; } /** -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-09 10:34:58.970099667 +0000 +++ 0026-net-mlx5-validate-hash-Rx-queue-pointer.patch 2021-02-09 10:34:57.942584623 +0000 @@ -1 +1 @@ -From 207b4d06c33896ac723139b3af62bf710ce082f9 Mon Sep 17 00:00:00 2001 +From b7a6f0c9edf0f660bff5951095452c67a21e9de8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 207b4d06c33896ac723139b3af62bf710ce082f9 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 92e3a792e1..8f9ee97f7a 100644 +index e4cbe6430b..1a5cf99d51 100644 @@ -27 +28 @@ -@@ -2353,7 +2353,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev, +@@ -2424,7 +2424,9 @@ uint32_t mlx5_hrxq_get(struct rte_eth_dev *dev,