Skip to contentSkip to conversation

ethdev: fix flow action async query coverity

PATCH Applied Suanming Mou 3 participants 3 messages Oct 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: fix flow action async query coverity

This commit adds the ops chcek to fix the coverity issue.

Coverity issue: 403258

Fixes c9dc03840873 ("ethdev: add indirect action async query")
---
 lib/ethdev/rte_flow.c | 2 ++
 1 file changed, 2 insertions(+)
lib/ethdev/rte_flow.c +2 -0
index 874f845513..3a67f1aaba 100644
@@ -2226,6 +2226,8 @@ rte_flow_async_action_handle_query(uint16_t port_id,
 	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
 	int ret;
 
+	if (unlikely(!ops))
+		return -rte_errno;
 	ret = ops->async_action_handle_query(dev, queue_id, op_attr,
 					  action_handle, data, user_data, error);
 	ret = flow_err(port_id, ret, error);
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw

Hi Suanming,

Quoted 27 lines

-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Tuesday, October 17, 2023 11:23 AM

This commit adds the ops chcek to fix the coverity issue.

Coverity issue: 403258

Fixes c9dc03840873 ("ethdev: add indirect action async query")
---
 lib/ethdev/rte_flow.c | 2 ++
 1 file changed, 2 insertions(+)
lib/ethdev/rte_flow.c +2 -0
index 874f845513..3a67f1aaba 100644
@@ -2226,6 +2226,8 @@ rte_flow_async_action_handle_query(uint16_t
 port_id,
 	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
 	int ret;
 
+	if (unlikely(!ops))
+		return -rte_errno;
 	ret = ops->async_action_handle_query(dev, queue_id, op_attr,
 					  action_handle, data, user_data,
Quoted 4 lines

error);
ret = flow_err(port_id, ret, error);
--
2.34.1

Applied
#2 lore raw
Quoted 6 lines · Ori Kam

Hi Suanming,

Quoted 4 lines

-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Tuesday, October 17, 2023 11:23 AM

Quoted 9 lines
Quoted 6 lines

This commit adds the ops chcek to fix the coverity issue.

Coverity issue: 403258

Fixes c9dc03840873 ("ethdev: add indirect action async query")

Applied to dpdk-next-net/main, thanks.