patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] crypto/scheduler: fix last element for valid args
@ 2023-04-14 12:33 Ciara Power
  2023-04-14 13:22 ` Ji, Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Ciara Power @ 2023-04-14 12:33 UTC (permalink / raw)
  To: Kai Ji; +Cc: dev, Ciara Power, fanzhang.oss, stable

The list of valid arguments for Scheduler PMD should be terminated with
a NULL entry, as expected by rte_kvargs_parse.

Without this, if an invalid key name was used, a global buffer overflow
occurred resulting in a segmentation fault.

Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Cc: fanzhang.oss@gmail.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 drivers/crypto/scheduler/scheduler_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 9d1ce46622..4e8bbf0e09 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -50,7 +50,8 @@ static const char * const scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
-	RTE_CRYPTODEV_VDEV_CORELIST
+	RTE_CRYPTODEV_VDEV_CORELIST,
+	NULL
 };
 
 struct scheduler_parse_map {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-03  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14 12:33 [PATCH] crypto/scheduler: fix last element for valid args Ciara Power
2023-04-14 13:22 ` Ji, Kai
2023-05-03  7:35   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).