[v4,41/42] vdpa/mlx5: use rte strerror

Message ID 20241023082852.2780488-42-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>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 093cdd08d2..d1069088a4 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -44,7 +44,7 @@  mlx5_vdpa_virtq_kick_handler(void *cb_arg)
 			    errno == EAGAIN)
 				continue;
 			DRV_LOG(ERR,  "Failed to read kickfd of virtq %d: %s.",
-				virtq->index, strerror(errno));
+				virtq->index, rte_strerror(errno));
 		}
 		break;
 	}