[dpdk-stable] patch 'net/hns3: fix unintended sign extension in dump operation' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:57:48 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

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/26/20. 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.

Thanks.

Luca Boccassi

---
>From 54161c5e70e1a93e8abee37f0ddd5a8021954a70 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3 at huawei.com>
Date: Tue, 9 Jun 2020 16:44:17 +0800
Subject: [PATCH] net/hns3: fix unintended sign extension in dump operation

[ upstream commit 5045e2b25ab1ce9ded4023b60fda7489a2b06663 ]

There are coverity defects related "Unintended sign extension" in the
internal static function named hns3_get_regs_length used for dumping reg
operation.

This patch fixes them by replacing the data type of cmdq_lines,
common_lines, ring_lines and tqp_intr_lines with uint32_t in the inner
static function named hns3_get_regs_length of hns3 PMD driver.

Coverity issue: 349917, 349914
Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Hongbo Zheng <zhenghongbo3 at huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index a3f2a51f9..63c8602a8 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -116,7 +116,7 @@ static int
 hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 {
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
-	int cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
+	uint32_t cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
 	uint32_t regs_num_32_bit, regs_num_64_bit;
 	uint32_t len;
 	int ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.767769770 +0100
+++ 0030-net-hns3-fix-unintended-sign-extension-in-dump-opera.patch	2020-07-24 12:53:48.219005193 +0100
@@ -1,8 +1,10 @@
-From 5045e2b25ab1ce9ded4023b60fda7489a2b06663 Mon Sep 17 00:00:00 2001
+From 54161c5e70e1a93e8abee37f0ddd5a8021954a70 Mon Sep 17 00:00:00 2001
 From: Hongbo Zheng <zhenghongbo3 at huawei.com>
 Date: Tue, 9 Jun 2020 16:44:17 +0800
 Subject: [PATCH] net/hns3: fix unintended sign extension in dump operation
 
+[ upstream commit 5045e2b25ab1ce9ded4023b60fda7489a2b06663 ]
+
 There are coverity defects related "Unintended sign extension" in the
 internal static function named hns3_get_regs_length used for dumping reg
 operation.
@@ -13,7 +15,6 @@
 
 Coverity issue: 349917, 349914
 Fixes: 936eda25e8da ("net/hns3: support dump register")
-Cc: stable at dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3 at huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>


More information about the stable mailing list