The function strerror() is insecure in a multi-thread environment.
This patch uses rte_strerror() to replace it.

Cc: sta...@dpdk.org

Signed-off-by: Dengdui Huang <huangdeng...@huawei.com>
Acked-by: Chengwen Feng <fengcheng...@huawei.com>
---
 drivers/bus/vdev/vdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 7974b27295..bdb5fa8fce 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -432,7 +432,7 @@ vdev_action(const struct rte_mp_msg *mp_msg, const void 
*peer)
                        strlcpy(ou->name, devname, RTE_DEV_NAME_MAX_LEN);
                        if (rte_mp_sendmsg(&mp_resp) < 0)
                                VDEV_LOG(ERR, "send vdev, %s, failed, %s",
-                                        devname, strerror(rte_errno));
+                                        devname, rte_strerror(rte_errno));
                        num++;
                }
                rte_spinlock_recursive_unlock(&vdev_device_list_lock);
-- 
2.33.0

Reply via email to