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 567B6489EF for ; Mon, 27 Oct 2025 17:23:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5171B4069D; Mon, 27 Oct 2025 17:23:16 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 769F14069D for ; Mon, 27 Oct 2025 17:23:14 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-426fd62bfeaso2377894f8f.2 for ; Mon, 27 Oct 2025 09:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761582194; x=1762186994; 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=BoI17LyJYJwA28Ntk9Ok9IZEiyobXd/ntJoNxyrEcZU=; b=Zn91YGVZHMDLnOv9wGHfkAUc6+BFn/MTLa2O3iWIsbZj4owVeG8xPzJLQnINeS0Rk9 sK9r2nU2ZET+NdH1SRfF8uqqGXVU5GJ/L/q21vGrn5vzla1TZSatXKxvQCP/Hr+sHBkU FZyKbvXbKYxi1sPZW040adx4/nCyJAZnrlkz01agCWoBJnuUoo00c1dwfBTF4VrKE1yH +WryHRXgjIAbtNLPLXn0NnX4NWc0cwoGfYZQ9vIPykYmJldyqOWkNmVZ9I84OUTP4VMy NFYTCc7H8V0RgUStfqYW0kbO5VLwZeQ4V3OlFkWAF2r6vxB3S9QWFx3YTEKUCpFLHNnA tseg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761582194; x=1762186994; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BoI17LyJYJwA28Ntk9Ok9IZEiyobXd/ntJoNxyrEcZU=; b=pryZd2BcivwiJPF5/kawxZ7C4ohaANcOymkkm3uyyF1Uh1bCcOr5G+MI6gSD2WNgzw HaGjdoTHAmCDmYBxZqmvH8EkPKp8+GOadAag+Ltf5REKXLGRW2c+ZvzXNY4Y6nA99J2L EjKoBIuqjDL5VSXhpweifQ98SGhYmoUg2B+y4oz/flBjjFfp4ef3V134q4CF86r84bZW 3w4/jf7ZjdmLngQpIGSesJPR02xZpmos4iUDQXXnVNh3BTWF0YxZ1vvNa1UoStRHNYWn Mo7bXuLxHDKvFZc3wggWCxP3GoO3rmB65d+WBYuTLR76ZRuOsbmvzgjAGeAZBzOmQcZ4 rUKw== X-Forwarded-Encrypted: i=1; AJvYcCXQFjdmXn3c56uYJbN0Y3jGR/D/nTRV/qO+cnceD2t3+9NgIoeoszprOJliuv3R3Y2iZMf/hQs=@dpdk.org X-Gm-Message-State: AOJu0YxVJMEtwFzFrGz5Ake7+ewwAYnpnmh83YCvnVC8pvrU+u5sFLrT wb3pii2DLb9Tc4JGOpbjKlqc/idAC0MbsgQ/Mso4JS5W1v8C2frhYMJl X-Gm-Gg: ASbGncv2S0YU4Idvo83TE98ZxKJ0wEwEBxjjqa5BuhBLGVBkwBYhvJreBsWukuvUal1 gBM2s6Jw1VveHLKh3Hs8nj1UT99TbuaRlW73un8Uu+ZZqfhU9Bxjs7PC1o13acyAO9aTHMzuGpU 8LEmDi/FedytTBSjuKmS/xF1aBpyIsVDKBezhoVirp2Owx2R0HMsgapGLy4n0MUXhiFQ4iq4z63 X4UI3Ajl9oJ1CEsAJkb67ZVjft5I0DhWqb6mZgrJO8rz2WH2lxbQPVtjg3k1x3otx5//MSy1Fl8 7umO4EOaBrwZh3ZV2JdQuBsMXg+343nIjPU6nPqC5PSzZJ6ho4ezD6bIJBbUBR7K6OmD8F/Zn4n chX37hUers6G42yMIiEsJRVSNJDaLEmryAQp/U26w6gMy8QFUTFyxB7MY474ygeDjwHWWSh/G7m wZgOLwHYpjdirbd6ZL X-Google-Smtp-Source: AGHT+IE3KX/VJlYN7sPvPY4R/3kR8PY4iBCoKc/PhbhHNPgVxHZc+5pEqzdRk4mirV2j+cgGO9zlcA== X-Received: by 2002:a5d:5d02:0:b0:426:fd63:bbc0 with SMTP id ffacd0b85a97d-429a7e5888dmr315007f8f.27.1761582193943; Mon, 27 Oct 2025 09:23:13 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:6fc5:c3bc:147e:832c]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-429952cbb2bsm15201030f8f.13.2025.10.27.09.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 09:23:13 -0700 (PDT) From: luca.boccassi@gmail.com To: Hemant Agrawal Cc: Sachin Saxena , dpdk stable Subject: patch 'net/enetfec: fix file descriptor leak on read error' has been queued to stable release 22.11.11 Date: Mon, 27 Oct 2025 16:19:37 +0000 Message-ID: <20251027162001.3710450-59-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-1-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.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/29/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/dcae8c220ba99d898ad10c3b014392fd2e93416e Thanks. Luca Boccassi --- >From dcae8c220ba99d898ad10c3b014392fd2e93416e Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Mon, 6 Oct 2025 13:34:00 +0530 Subject: [PATCH] net/enetfec: fix file descriptor leak on read error [ upstream commit 2e503215692e8ab50e473e963ec58d5ab714a375 ] The file descriptor was not closed when a read error occurred while reading the first line from a UIO device file. This could lead to resource leakage. The patch ensures the descriptor is closed in case of read failure. Fixes: b84fdd39638b ("net/enetfec: support UIO") Signed-off-by: Hemant Agrawal Acked-by: Sachin Saxena --- drivers/net/enetfec/enet_uio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c index 6539cbb354..f41e314745 100644 --- a/drivers/net/enetfec/enet_uio.c +++ b/drivers/net/enetfec/enet_uio.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2021 NXP + * Copyright 2021,2024 NXP */ #include @@ -66,13 +66,16 @@ file_read_first_line(const char root[], const char subdir[], "%s/%s/%s", root, subdir, filename); fd = open(absolute_file_name, O_RDONLY); - if (fd <= 0) + if (fd < 0) { ENETFEC_PMD_ERR("Error opening file %s", absolute_file_name); + return fd; + } /* read UIO device name from first line in file */ ret = read(fd, line, FEC_UIO_MAX_DEVICE_FILE_NAME_LENGTH); if (ret <= 0) { ENETFEC_PMD_ERR("Error reading file %s", absolute_file_name); + close(fd); return ret; } close(fd); -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-27 15:54:36.967292619 +0000 +++ 0059-net-enetfec-fix-file-descriptor-leak-on-read-error.patch 2025-10-27 15:54:34.839950653 +0000 @@ -1 +1 @@ -From 2e503215692e8ab50e473e963ec58d5ab714a375 Mon Sep 17 00:00:00 2001 +From dcae8c220ba99d898ad10c3b014392fd2e93416e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2e503215692e8ab50e473e963ec58d5ab714a375 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 9f4e896985..23cb4e7e93 100644 +index 6539cbb354..f41e314745 100644