[PATCH 2/2] net/cpfl: fix overflow on store of single-queue settings

Shetty, Praveen praveen.shetty at intel.com
Tue Sep 15 12:42:08 CEST 2026


The Rx and Tx single queue settings in cpfl driver are both boolean values, but the parse_bool function writes to them as int. This causes an extra 3 bytes to be written beyond the variable itself.
Fix by changing store type to bool.

Bugzilla ID: 2042
Fixes: 2d823ecd671c ("net/cpfl: support device initialization")
Cc: stable at dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com> ===
Note: this fix is superceded by the kvargs numeric args patchset [1].
However, that patchset relies on new kvargs features unlikely to be backported, so this standalone fix is useful for backporting or if the whole other set doesn't make the 26.11 release.

[1] https://patches.dpdk.org/project/dpdk/list/?series=39247
---
 drivers/net/intel/cpfl/cpfl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.c b/drivers/net/intel/cpfl/cpfl_ethdev.c
index 4315adb68c..b1b7637f48 100644
--- a/drivers/net/intel/cpfl/cpfl_ethdev.c
+++ b/drivers/net/intel/cpfl/cpfl_ethdev.c
@@ -1448,7 +1448,7 @@ parse_vport(const char *key, const char *value, void *args)  static int  parse_bool(const char *key, const char *value, void *args)  {
-	int *i = args;
+	bool *i = args;
 	char *end;
 	int num;
 
@@ -1462,7 +1462,7 @@ parse_bool(const char *key, const char *value, void *args)
 		return -EINVAL;
 	}
 
-	*i = num;
+	*i = (num == 1);
 	return 0;
 }
 
--

Looks good to me,
Acked-by: Praveen Shetty <praveen.shetty at intel.com>

2.53.0



More information about the stable mailing list