patch 'net/virtio: fix uninitialized RSS key' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:35:01 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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/26/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4c4c0cf459e56886b2ae58c0cc7d64c1b7032f57

Thanks.

Kevin

---
>From 4c4c0cf459e56886b2ae58c0cc7d64c1b7032f57 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Sat, 8 Jan 2022 16:14:21 +0800
Subject: [PATCH] net/virtio: fix uninitialized RSS key

[ upstream commit 0f7438e6d4009a52482d6a662f440ab067e63c60 ]

This patch fixes an issue that uninitialized old_rss_key
is used for restoring the rss_key.

Coverity issue: 373866
Fixes: 0c9d66207054 ("net/virtio: support RSS")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b317649d7e..d180162abd 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2029,5 +2029,6 @@ virtio_dev_rss_hash_update(struct rte_eth_dev *dev,
 	return 0;
 restore_key:
-	memcpy(hw->rss_key, old_rss_key, VIRTIO_NET_RSS_KEY_SIZE);
+	if (rss_conf->rss_key && rss_conf->rss_key_len)
+		memcpy(hw->rss_key, old_rss_key, VIRTIO_NET_RSS_KEY_SIZE);
 restore_types:
 	hw->rss_hash_types = old_hash_types;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:47.026749357 +0000
+++ 0112-net-virtio-fix-uninitialized-RSS-key.patch	2022-02-21 15:22:44.217704410 +0000
@@ -1 +1 @@
-From 0f7438e6d4009a52482d6a662f440ab067e63c60 Mon Sep 17 00:00:00 2001
+From 4c4c0cf459e56886b2ae58c0cc7d64c1b7032f57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f7438e6d4009a52482d6a662f440ab067e63c60 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list