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 521F84331C; Mon, 13 Nov 2023 17:26:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40496402CF; Mon, 13 Nov 2023 17:26:23 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id C49254026C for ; Mon, 13 Nov 2023 17:26:22 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6b5af4662b7so3870271b3a.3 for ; Mon, 13 Nov 2023 08:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699892782; x=1700497582; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=IjF4oDbd9R1938JzOSKxJI5Z5WM/JimDC9US1uHQPKE=; b=wJ5yUoY11swethLHfomjQGKFUpeGj2alO7JDbYzPXRaYNjlKnaYo7/ibhPpOHeK0ae lZu5vlAyHi1Tlqhh69DpJxPakfZkxEu3WY3QF9dDEUrPubX1SZwwou2KjeRYJBGC20IG 3iW/vqu8dPFM1ojd7KeHk64Lu3Fcve8JskRq5q1ElMZKH2rzEWkvMtrDTVEOnOINPN2n STQ2Ydbawj6EMGoRH8gJCVurDTRlQWKArfyJWCp47p1H0k3zgpXAwwI/yZKVS6c8NhQ0 fRExDpJ22Gcg+lUkndmsD4bPsldPoa547it02InHvHnKrytEyMMSVCRN8LX4ewTYJS6a B87w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699892782; x=1700497582; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IjF4oDbd9R1938JzOSKxJI5Z5WM/JimDC9US1uHQPKE=; b=sOEEw82a3AHrcEt3LtO8BD4pDmIxXsmbHfmy8l9nPfbVx+WG9mLq8l7r8mZJ9G2qDl Qs+8lM4KsdKr7w11ajssCyx1GoXFQI769aLdzkiyVVfLnleHWOLtob+fJMSwDQcx2lTa ZnXiYdeBoScoJtVZG6L+y/tttRyxU6EL/6V4Pvel+HLgA+3/GRFluQYhnbO7XDlfE602 kKuK8u/0SVJj0lWwo/IVW4us8z4xZ95zWwUqb+VJWwVa5tCAeQsL6If/AyfWF6ANt/09 siBhao8EWJQoG0u4FRziak32XXL28N+DtukSH567Hb0DOQSlL4GUUjWmVEKHBn5lrIc8 ZgLQ== X-Gm-Message-State: AOJu0YxC+ytlIwPb997QeTECnxA8ZYa08/usHf3WjHUBawQ33HHRQCoT ZmtlsLCkrD5hFgKaqQWvAKJntQ== X-Google-Smtp-Source: AGHT+IE0kgnBzQHXjAkaE1vUXWuzH/EAmimc3zdTfqHL09ylvOGAwtaBVOuuIArBw+Ic8YLMr5s2FA== X-Received: by 2002:a05:6a20:dca0:b0:174:210c:34b0 with SMTP id ky32-20020a056a20dca000b00174210c34b0mr4410333pzb.0.1699892782039; Mon, 13 Nov 2023 08:26:22 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id w6-20020a056a0014c600b006c3328c990csm3946224pfu.163.2023.11.13.08.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 08:26:21 -0800 (PST) Date: Mon, 13 Nov 2023 08:26:20 -0800 From: Stephen Hemminger To: Jie Hai Cc: , Maxime Coquelin , Chenbo Xia , , Subject: Re: [PATCH 21/21] examples/vhost: replace strtok with strtok_r Message-ID: <20231113082620.66efe9b2@hermes.local> In-Reply-To: <20231113104550.2138654-22-haijie1@huawei.com> References: <20231113104550.2138654-1-haijie1@huawei.com> <20231113104550.2138654-22-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 13 Nov 2023 18:45:50 +0800 Jie Hai wrote: > Multiple threads calling the same function may cause condition > race issues, which often leads to abnormal behavior and can cause > more serious vulnerabilities such as abnormal termination, denial > of service, and compromised data integrity. > > The strtok() is non-reentrant, it is better to replace it with a > reentrant function. > > Signed-off-by: Jie Hai This is in initialization code, can not be called by multiple threads.