patch 'ethdev: fix calloc arguments' has been queued to stable release 22.11.3

Xueming Li xuemingl at nvidia.com
Sun Jun 25 08:34:37 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.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 06/27/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e659a163e34a9da36b218d7d91826411e2133e1a

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e659a163e34a9da36b218d7d91826411e2133e1a Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1 at huawei.com>
Date: Wed, 7 Jun 2023 15:41:56 +0800
Subject: [PATCH] ethdev: fix calloc arguments
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit bc7126d964e9226a115c982c4b4dfaa1314634a0 ]

The 'calloc' uses number as first argument, sizeof is generally wrong.
This patch fixes it.

Fixes: 8af559f94cef ("ethdev: support telemetry private dump")

Signed-off-by: Jie Hai <haijie1 at huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 lib/ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index f21dea7150..08a08cf431 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -5945,7 +5945,7 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -EINVAL;
 
-	buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
+	buf = calloc(RTE_TEL_MAX_SINGLE_STRING_LEN, sizeof(char));
 	if (buf == NULL)
 		return -ENOMEM;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-06-25 14:32:00.097498100 +0800
+++ 0059-ethdev-fix-calloc-arguments.patch	2023-06-25 14:31:58.405773900 +0800
@@ -1 +1 @@
-From bc7126d964e9226a115c982c4b4dfaa1314634a0 Mon Sep 17 00:00:00 2001
+From e659a163e34a9da36b218d7d91826411e2133e1a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit bc7126d964e9226a115c982c4b4dfaa1314634a0 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index a134928c8a..04daa280d0 100644
+index f21dea7150..08a08cf431 100644
@@ -22 +24 @@
-@@ -6570,7 +6570,7 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,
+@@ -5945,7 +5945,7 @@ eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,


More information about the stable mailing list