[v4,03/42] eventdev: use rte strerror

Message ID 20241023082852.2780488-4-huangdengdui@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers
Series replace strerror |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

huangdengdui Oct. 23, 2024, 8:28 a.m. UTC
The function strerror() is insecure in a multi-thread environment.
This patch uses rte_strerror() to replace it.

Cc: stable@dpdk.org

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/eventdev/rte_event_eth_rx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 3ee20d95f3..1aef2458b6 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1106,7 +1106,7 @@  rxa_intr_ring_enqueue(struct event_eth_rx_adapter *rx_adapter, void *data)
 		 */
 		if (err)
 			RTE_EDEV_LOG_ERR("Failed to enqueue interrupt"
-				" to ring: %s", strerror(-err));
+				" to ring: %s", rte_strerror(-err));
 		else
 			rte_eth_dev_rx_intr_disable(port_id, queue);
 	}