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 D3CE045BEC; Sun, 27 Oct 2024 04:09:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0A8F4067E; Sun, 27 Oct 2024 04:08:53 +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 2D3104065E for ; Sun, 27 Oct 2024 04:08:50 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-71e7086c231so2404491b3a.0 for ; Sat, 26 Oct 2024 20:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729998529; x=1730603329; 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=s1P7h0ePI7+ulaeXdX0oT6YqyIxZGEjLqIhlRqNL1D0=; b=TKn2ZPk2FXVkPEL3v9AKQ3t7pJoLwF9a8EVngENcUeSMXZw/zQjah84Sy9WnZt8MCf BUgTHb9v2SZ8rGxLU3fzadm/cjnrIJN5oCXFCMh27hE10EXFnvv0pYUUWAgpmksPWVeJ WoTBkLWM46a7AikoiwPYP46vN1kCsPKE1yFAjQA60Doxd0l6aMtIhvH0eT0dzau8EsTb gD6r9IZZYN+Ddkoa3ACAvPDZsU28V7dK70wRUmhe4AYwlvqYwejOCnOL+8E+Ydrv0d+M g5DeJAtWYZ5zs7NtD7rYnA+iBbIoJefL7/WIlMHMzWHuDw+svKCruvx3X9u3rEMKvGLH swlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729998529; x=1730603329; 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=s1P7h0ePI7+ulaeXdX0oT6YqyIxZGEjLqIhlRqNL1D0=; b=Vrv5hVrMEP5MXTvsIQO0uHzAccgivu6+fx2WSLnuri+HhBL+/vlvLCaZPZETYkAs9A xasFzMDyz6oRipXhh9RJpZHcoF3EkWoucSUlQgi4TOPuPT2KwJeNdqWCNLBDhT3W2zZe L/fD517TqDOrIMdvq6mFtIHMQoMKPg36wsUusEmRt3cAnZrsRV26tgyY3JL6DDNJzf5e 30HPn7e+AMJy6Zb5ktDVRksKK+o/D8QPT/4keeeH57Q+ZOfewDMndZj07zun5K2ECRsT R1+rl2fTeqTfkgg6Rnythdup2MqQyLRk/BzDW0UI+HXQuTjWZj1/nfXWPWCjYqRK9b43 50Qw== X-Gm-Message-State: AOJu0YxJM/OHSxcV4Uc5PAMohFSFU7LQ/uvgr1fW1yD+pU7XI4Eu9sVF JFOJyNB5qCG22TCdlLZZ783/Bz1ewYxnwd3ykERQwX8A8wY2ZNUVAt24JyFUaDQ= X-Google-Smtp-Source: AGHT+IHBjO5BKdNYZi7QH6/b1Gj9BgWTdrHl4Ik+F7wUTA87Z1p1H1W5/BWS3iJ/Hko7QYvfY/5V3g== X-Received: by 2002:a05:6a00:4610:b0:71e:4fe4:282e with SMTP id d2e1a72fcca58-72063096385mr6849555b3a.28.1729998529310; Sat, 26 Oct 2024 20:08:49 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057931766sm3384534b3a.49.2024.10.26.20.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2024 20:08:49 -0700 (PDT) Date: Sat, 26 Oct 2024 20:06:47 -0700 From: Stephen Hemminger To: Jie Hai Cc: , , , Hemant Agrawal , Sachin Saxena , Nipun Gupta , Ferruh Yigit , Shreyansh Jain , Santosh Shukla , , , Subject: Re: [PATCH v4 07/13] bus/fslmc: replace strtok with reentrant version Message-ID: <20241026200647.02f14e0e@hermes.local> In-Reply-To: <20241026101451.29135-8-haijie1@huawei.com> References: <20231113104550.2138654-1-haijie1@huawei.com> <20241026101451.29135-1-haijie1@huawei.com> <20241026101451.29135-8-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Sat, 26 Oct 2024 18:14:45 +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. >=20 > The strtok() is non-reentrant, it is better to replace it with a > reentrant version. >=20 > Fixes: 9ccb76b24c1d ("bus/fslmc: enable portal interrupt handling") > Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") > Cc: stable@dpdk.org >=20 > Signed-off-by: Jie Hai > Acked-by: Chengwen Feng > Acked-by: Sachin Saxena > Acked-by: Morten Br=C3=B8rup > --- > drivers/bus/fslmc/fslmc_bus.c | 5 +++-- > drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 ++-- > 2 files changed, 5 insertions(+), 4 deletions(-) Only called during bus scan so single threaded. Not needed for stable.