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 34BF546A9C for ; Mon, 30 Jun 2025 14:26:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 156754025D; Mon, 30 Jun 2025 14:26:01 +0200 (CEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 819574025D for ; Mon, 30 Jun 2025 14:25:59 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-451d3f72391so21856675e9.3 for ; Mon, 30 Jun 2025 05:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751286359; x=1751891159; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6C5MieTLJzo25b2Wki6p3RZzoIywFOtQuF/2X+CsFGY=; b=WChi5Uh5FgkE5eXeSFqA/JtnC+pdyAcRFKMIju2F648MS2Lt3xd2lVeDC5FAX6/k8t UVSO/gg20r+LfLVRkVB9iZih9CC1Ok0/MLP1yFMmO0k47LcJJ1w+UUeHKAbwVjgcQDvU RJTlVpqqghHw+prmr5d8C+DzFJe8MV5Wf8r+51PEdNS5+X3N2+VF4TzIpEeza2A59M8T nvXvZz62ziY1UNc4bx3J8rdiPOWiAd7aRi9gpa0LYZ6Z91uaFeTKcGm8rAUtVNP6stP7 OSEKal3yw+3xR3Rxb+nUXzuMA8NjeKDYIhyjJEWBUy1ryb723svv7qQWzyAxzbe3liFa p3/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751286359; x=1751891159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x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IFWokYOD2K0o2b32pJCVcUAmjXm2f3drBmStQsg0iV/5H3KIUIb6WLGOWHU4s1O3jDXR9WSmg== X-Received: by 2002:a05:600c:1911:b0:44a:b7a3:b95f with SMTP id 5b1f17b1804b1-4539264fd0fmr104314575e9.25.1751286358692; Mon, 30 Jun 2025 05:25:58 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:ded1:f637:68f:c2a6]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a892e52c99sm10170826f8f.49.2025.06.30.05.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jun 2025 05:25:58 -0700 (PDT) From: luca.boccassi@gmail.com To: Gregory Etelson Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'common/mlx5: fix extraction of auxiliary device name' has been queued to stable release 22.11.9 Date: Mon, 30 Jun 2025 13:25:31 +0100 Message-ID: <20250630122556.1133654-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250612210733.2506558-72-luca.boccassi@gmail.com> References: <20250612210733.2506558-72-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/02/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/019e410754f9ca15a1cddd44e0865b1af1f3f0fe Thanks. Luca Boccassi --- >From 019e410754f9ca15a1cddd44e0865b1af1f3f0fe Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Sun, 15 Jun 2025 10:41:29 +0300 Subject: [PATCH] common/mlx5: fix extraction of auxiliary device name [ upstream commit a60378a398fd95e6de69401e8ed06fcc3f4a3929 ] The PMD reads auxiliary network device name from the Linux sysfs. The current implementation closed directory context before it copied a file name from that directory into internal buffer. The result was uncertain. This change closes sysfs directory after file name was copied. Fixes: 777b72a9339c ("common/mlx5: support auxiliary bus") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/common/mlx5/linux/mlx5_common_auxiliary.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/common/mlx5/linux/mlx5_common_auxiliary.c b/drivers/common/mlx5/linux/mlx5_common_auxiliary.c index 33479ffd68..60ea67049d 100644 --- a/drivers/common/mlx5/linux/mlx5_common_auxiliary.c +++ b/drivers/common/mlx5/linux/mlx5_common_auxiliary.c @@ -36,14 +36,17 @@ mlx5_auxiliary_get_child_name(const char *dev, const char *node, if (dent->d_name[0] != '.') break; } - closedir(dir); if (dent == NULL) { rte_errno = ENOENT; - return -rte_errno; + goto end; } if (rte_strscpy(child, dent->d_name, size) < 0) - return -rte_errno; - return 0; + goto end; + rte_errno = 0; + +end: + closedir(dir); + return -rte_errno; } static int -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-30 13:21:21.813699223 +0100 +++ 0001-common-mlx5-fix-extraction-of-auxiliary-device-name.patch 2025-06-30 13:21:21.727056912 +0100 @@ -1 +1 @@ -From a60378a398fd95e6de69401e8ed06fcc3f4a3929 Mon Sep 17 00:00:00 2001 +From 019e410754f9ca15a1cddd44e0865b1af1f3f0fe Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a60378a398fd95e6de69401e8ed06fcc3f4a3929 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index b4ea604820..3ee2f4638a 100644 +index 33479ffd68..60ea67049d 100644 @@ -27 +28 @@ -@@ -38,14 +38,17 @@ mlx5_auxiliary_get_child_name(const char *dev, const char *node, +@@ -36,14 +36,17 @@ mlx5_auxiliary_get_child_name(const char *dev, const char *node,