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 C301EA0A0E for ; Mon, 10 May 2021 18:03:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC9BE4003E; Mon, 10 May 2021 18:03:47 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2067.outbound.protection.outlook.com [40.107.237.67]) by mails.dpdk.org (Postfix) with ESMTP id B51814003E for ; Mon, 10 May 2021 18:03:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iHW6ewi89SnMKt0LN3IJY5Kk8zXbP7yuz/OPBGq906OJiNmyronfCNbFzmqcBAk25DI9ugKuDhDhIG3Y9W8a8KgWEf0YAXFJBm02YSs/kUMNHIIiJjg3ojRSfZyH0W0QcMFen2VT7n1zzryyztt6Dhd33pIhmGn+6ppAi92N7NqZ7JtZ8IRJaoXn2Fu2yORkYSHo1VRKhx1Z8D52FENmKupLyuBTcWX/VlNoyrXamVwx9r0M2YkOkCzY2JjrWn9OFuIfuGarIP2Nc6QEGIsMdySyDimwNwVTIeteL1gyT2VspWE7EzkDS+LPT0JgXTmnu4qtRsO1//HULU9yCHh9xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6W1/f7eP6+pMMdXLCkSyq5dVqfRf6OZchvKF6DcJSRM=; b=GTpXfrjGqdo9JOIlxv9p3JJKVwdJWU9j3bdz8cjydtPGGcE/tZsevG7e80TUt9yu3CEp8FJlc922iHqessXj55R5zJerrT2hrjc+8MnP5FMj7IPBXFiQoGGpKk1UvYjHcDfJiciSzcG1sZp9Q1bVpUgnU92OGiKNxj8aXmGUpdNHg/c2HDpwz8q0V/+LATRW6aQtnKa27v7EoErBIdlhsEufAi4uErh2eUkn/ChquLOVH8KjHZWR9fKADu0grfemppSbqtoHOnzbbW8EctsMmJkoyXA/AtyEc/1YCdr7TOm11yVmppjZcgju+05xHOD2IKoxaUuZi4NN+xcv//FcMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6W1/f7eP6+pMMdXLCkSyq5dVqfRf6OZchvKF6DcJSRM=; b=AlgtQvvHA1KpUa2DqYE+fJR6vj957BVNG36fvKe4v61XKTL7ogRw1sBZdlF15ewRs5otTjQR118gqLWfyn1gXPAUUfhLMRqsqbgtSV5jIWqxSkUjXRIrgw0pyoiJYq5dYgzU6WcOtp5CeCDW3uckcAwAJVBkqUhkQHEBp1rRDPAriYj21gj4FuEEhB4cNDsa7d1nrUf2WPKeT6+tp37GH0mVFNE2V/v9MwJLWZnUgGg/vHNEtOO1k4K/KKrV1XCBQKIraNskJZxYYA3ZAuVBfC8SYRHeuDAYJaxgYbHqoJUZUG1pQxQmGu7LXYRRzjNuZlPRoy+5hgrBWL+x1acIlQ== Received: from BN8PR03CA0020.namprd03.prod.outlook.com (2603:10b6:408:94::33) by DM6PR12MB2907.namprd12.prod.outlook.com (2603:10b6:5:183::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.29; Mon, 10 May 2021 16:03:45 +0000 Received: from BN8NAM11FT067.eop-nam11.prod.protection.outlook.com (2603:10b6:408:94:cafe::c9) by BN8PR03CA0020.outlook.office365.com (2603:10b6:408:94::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:03:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT067.mail.protection.outlook.com (10.13.177.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:03:45 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:03:36 +0000 From: Xueming Li To: Anatoly Burakov CC: Luca Boccassi , Andrew Boyer , David Marchand , dpdk stable Date: Mon, 10 May 2021 23:59:14 +0800 Message-ID: <20210510160258.30982-5-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5d16d66-6fb1-4336-1107-08d913cd309b X-MS-TrafficTypeDiagnostic: DM6PR12MB2907: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IgLYFPqW22giLz1TNOS7Iyj3LA7lxB8jN0ciWIPrIlXTFFrrAY0OXItVV7cCmUdTMFF6DdFSBArL2OL7//crEnHEpuX/FoYudFEQCB006DQXmK65ZAw5XNwVvN+9cCM5wyMrrlMKvzlwBS9NYN58l4tLKZUTu5GRBDGtYEDDCzl+9RwtFOrj2Jo/mzo89QZlM4RlC/hJp01yYdsYjtt9UyfdR7HG2F4ObS8ExiPm92qRfWfDm1XQs02QZS+bfPPwx59B1sl+eGLV/GsNWboxQo31Ll3ntMmpSQFm3cNc7/DUBsfLJJ+4O1R3BTpFfuGmxaSgoQg761xrOQWGje4J6J7p1WtFQK/ddCow+TBwBPLfxxXIG+gTu2aLgV7iHClEDbv0wgCppq090UAyMry7K+yuoLzu4lpZI8VLiPVS4+t4jLj0vYg67p/F2ENkLopSTyybsRQwFghvqU570Bk/ZOjvwWlXpUhl+YYBEl0guehXKOIz7ZUA2+OWUqz2FO9mLXYLhQO48jyDIdRG/y47D9z2Jh1dimEiotk+Di82/BWX6aMeO8IgQ5JIqyYuryWiFuUae4Y+y5fDllDEPoO5gH0UXW0MYzZHRwuXmx5qh6hoJChNAyfdDHohRTi183moeb+RONL11cfvJwDZ/Rv3Z7lIHfnWRd3D2Jwa0utxsmqPKRtqYFbYV1bnXV9R0bC/sIJCoFsVKtdKwzQNMLNlbZvAURheRSVJE1MG6etzAr2dfj4ZF+0c93Gblu4TlcbG4Dipt2TBiBg7zNONIYOiDw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(39860400002)(136003)(376002)(346002)(36840700001)(46966006)(53546011)(47076005)(16526019)(15650500001)(336012)(7636003)(70206006)(186003)(6916009)(55016002)(8936002)(54906003)(8676002)(2616005)(426003)(4326008)(82310400003)(7696005)(36860700001)(83380400001)(86362001)(316002)(26005)(2906002)(36906005)(5660300002)(70586007)(6286002)(356005)(478600001)(36756003)(82740400003)(6666004)(1076003)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:03:45.2509 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f5d16d66-6fb1-4336-1107-08d913cd309b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT067.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2907 Subject: [dpdk-stable] patch 'fbarray: fix log message on truncation error' has been queued to stable release 20.11.2 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/4f140c14a27906881c4644b5afdeda83146ea9fd Thanks. Xueming Li --- >From 4f140c14a27906881c4644b5afdeda83146ea9fd Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 19 Feb 2021 17:54:45 +0000 Subject: [PATCH] fbarray: fix log message on truncation error Cc: Luca Boccassi [ upstream commit 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 ] When file truncation fails, the log message attempts to print a path of file we failed to truncate, but this path was never set to anything and, what's worse, was uninitialized. Fix it by passing path from the caller. Coverity issue: 366122 Fixes: c44d09811b40 ("eal: add shared indexed file-backed array") Reported-by: Andrew Boyer Signed-off-by: Anatoly Burakov Reviewed-by: David Marchand --- lib/librte_eal/common/eal_common_fbarray.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c index d974f3dab7..592ec58594 100644 --- a/lib/librte_eal/common/eal_common_fbarray.c +++ b/lib/librte_eal/common/eal_common_fbarray.c @@ -81,9 +81,8 @@ get_used_mask(void *data, unsigned int elt_sz, unsigned int len) } static int -resize_and_map(int fd, void *addr, size_t len) +resize_and_map(int fd, const char *path, void *addr, size_t len) { - char path[PATH_MAX]; void *map_addr; if (eal_file_truncate(fd, len)) { @@ -792,7 +791,7 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len, if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN)) goto fail; - if (resize_and_map(fd, data, mmap_len)) + if (resize_and_map(fd, path, data, mmap_len)) goto fail; } ma->addr = data; @@ -895,7 +894,7 @@ rte_fbarray_attach(struct rte_fbarray *arr) if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN)) goto fail; - if (resize_and_map(fd, data, mmap_len)) + if (resize_and_map(fd, path, data, mmap_len)) goto fail; /* store our new memory area */ -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:26.877953200 +0800 +++ 0006-fbarray-fix-log-message-on-truncation-error.patch 2021-05-10 23:59:26.310000000 +0800 @@ -1 +1 @@ -From 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 Mon Sep 17 00:00:00 2001 +From 4f140c14a27906881c4644b5afdeda83146ea9fd Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org