From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A826E45BAE; Wed, 23 Oct 2024 10:31:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C26FE427BE; Wed, 23 Oct 2024 10:29:26 +0200 (CEST) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id DA7EA410E6 for ; Wed, 23 Oct 2024 10:28:58 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4XYMc611Z8z1SD9s; Wed, 23 Oct 2024 16:27:34 +0800 (CST) Received: from dggpeml500011.china.huawei.com (unknown [7.185.36.84]) by mail.maildlp.com (Postfix) with ESMTPS id C323F1400E8; Wed, 23 Oct 2024 16:28:57 +0800 (CST) Received: from localhost.huawei.com (10.50.165.33) by dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 23 Oct 2024 16:28:57 +0800 From: Dengdui Huang To: CC: , , , , , , , , Subject: [PATCH v4 25/42] net/dpaa2: use rte strerror Date: Wed, 23 Oct 2024 16:28:35 +0800 Message-ID: <20241023082852.2780488-26-huangdengdui@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20241023082852.2780488-1-huangdengdui@huawei.com> References: <20231114082539.1858594-44-huangdengdui@huawei.com> <20241023082852.2780488-1-huangdengdui@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500011.china.huawei.com (7.185.36.84) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Chengwen Feng Acked-by: Morten Brørup --- drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 7b3e587a8d..ef34bce88f 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1170,7 +1170,7 @@ dpaa2_eth_setup_irqs(struct rte_eth_dev *dev, int enable) irq_index, mask); if (err < 0) { DPAA2_PMD_ERR("Error: dpni_set_irq_mask():%d (%s)", err, - strerror(-err)); + rte_strerror(-err)); return err; } @@ -1178,7 +1178,7 @@ dpaa2_eth_setup_irqs(struct rte_eth_dev *dev, int enable) irq_index, enable); if (err < 0) DPAA2_PMD_ERR("Error: dpni_set_irq_enable():%d (%s)", err, - strerror(-err)); + rte_strerror(-err)); return err; } -- 2.33.0