patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/cnxk: fix crash in IPsec telemetry
@ 2022-05-19 12:21 David Marchand
  2022-06-13 12:44 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2022-05-19 12:21 UTC (permalink / raw)
  To: dev
  Cc: stable, Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, Ankur Dwivedi, Jerin Jacob

Calling this telemetry callback with no argument caused a crash.

Fixes: 41cc645c214f ("net/cnxk: add inline IPsec telemetry for CN9K")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c b/drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c
index dfad5af8fe..bfdbd1ee5d 100644
--- a/drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c
+++ b/drivers/net/cnxk/cnxk_ethdev_sec_telemetry.c
@@ -229,6 +229,9 @@ ethdev_sec_tel_handle_info(const char *cmd __rte_unused, const char *params,
 	uint32_t i;
 	int ret;
 
+	if (params == NULL || strlen(params) == 0 || !isdigit(*params))
+		return -EINVAL;
+
 	port_id = strtoul(params, &end_p, 0);
 	if (errno != 0)
 		return -EINVAL;
-- 
2.36.1


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

end of thread, other threads:[~2022-06-13 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 12:21 [PATCH] net/cnxk: fix crash in IPsec telemetry David Marchand
2022-06-13 12:44 ` Jerin Jacob

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).