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 0A785A0543 for ; Tue, 21 Jun 2022 10:10:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C33C1427E9; Tue, 21 Jun 2022 10:09:56 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2040.outbound.protection.outlook.com [40.107.237.40]) by mails.dpdk.org (Postfix) with ESMTP id 266EB42BA5 for ; Tue, 21 Jun 2022 10:09:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mz+9LZgXXgLZxzcgf6JJMNRsrV3zIfflBFm87yUxqTppi9RFx8nfiu0xFKsf8Ec6wGDFRVvTD3fGc24fmr9syZHKLKJ9hJc4f2Q5qxpJps9fcA7s606rs2pzQrMeN822dlj4BuBq6lV9rY8kpIg2Y+swTRPrkQLrU8KarMPLUnMIWrM1IvrX20S0FDxVvk/NQG8OBgj+MJxKZydQJTGDtdf0YlTWPocJ5DAyU44i3iSn+2fD9zM8MAAcnBvHMhDbH0rr18GlA5tTQYor7XF6n/PU+3EJuwfg11cqDew+vBlTiuLGERxRhCVfOx1hkIhM4u5tEgZynzxOx/fvl5bEIw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X0QHPXhgdLCHa1TdeivTQcwuru466v2BMmvMXN2BX6w=; b=C8B8K/cQAIAaAIGqzb+S1rDYEbCt4Kzq5o348GNilM7bkLU6KQd59BFJtLqJLjeNL/ZLr9XIa1ls8VYVhPCFxAC0WnoM52nDJAUTRWMQ0oDJ/InnAwn/dWRQRnxuwZKppdvj6gYYH5Gfv4WF/ZDvlt+2TyPHUcSJPzqJBGoNqD/TXyYB7ChMGfcjiljbtu4cIKyjEvK1Ej30hcwMzOi+BuX+iwUhEMOblxty1Dz1QYLDmD+NuBg2q6IOu7VHmN98kiE2rUaY97qiFTu9pFKeq6jV+2/OoVODfil6cZ+GaJ0HUL0+UBRg71qMIXWT4gXC3hlk8j4TchdUWdGNGlUBfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=oktetlabs.ru smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=X0QHPXhgdLCHa1TdeivTQcwuru466v2BMmvMXN2BX6w=; b=ErVbyVY9YFrgjA+kwoxlPmafqqAyvfx4z79VZO/85G+aBlqOeS2GTx7bZ6M8rQGv0VtKXp7hTnqcS81RFc4o4/+5G9a3ALDPDWaYH9HK1SaN4/xl2Bvex+aApJZ+wyyueJ7Cctc97RaM4xJ6c4QkvHC/S9bBn9s0M3RbuNgo2qCG2QfYeCbVg/2XS/s6KlRtvy0lixC5biLW/uifyosVEC2Y/IZl8kCNqiVOw/0+t2CcZAAXBrL2PFcGB5WLQ5wRl5aeEVxxJRJjcbqZEAL4Ej0+YDGL9nBT2aGFkpk2uqzJPbyXyKFdjXjrVJTfJWvp+O6k/6oJe1jCIo2ZaG48oA== Received: from MWHPR22CA0072.namprd22.prod.outlook.com (2603:10b6:300:12a::34) by MWHPR12MB1389.namprd12.prod.outlook.com (2603:10b6:300:13::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:09:53 +0000 Received: from CO1NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:300:12a:cafe::51) by MWHPR22CA0072.outlook.office365.com (2603:10b6:300:12a::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.22 via Frontend Transport; Tue, 21 Jun 2022 08:09:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT028.mail.protection.outlook.com (10.13.175.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:09:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:09:51 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:09:49 -0700 From: Xueming Li To: Chengwen Feng CC: =?UTF-8?q?Morten=20Br=C3=B8rup?= , "Andrew Rybchenko" , dpdk stable Subject: patch 'ethdev: fix possible null pointer access' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:22 +0300 Message-ID: <20220621080301.2315720-77-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ba39d42-d20a-48bb-dfd4-08da535d6b0b X-MS-TrafficTypeDiagnostic: MWHPR12MB1389:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LpoW8V/a1H5wNU16Egghp/cI4kkCtviOpA/tWkUCY/+5Bya5fj+Wr4iThE2iJyUYBhtZKg4zvNJsBhJXEd7Zb22Izpf8IRtxOsOgNHGmmmHi6ky7a/IeSyrwVU939Fr9t2snWzCOPCYnwlH7dY4pTQ2A9mSWTmvC5cGvQFO+n6tTNrEd65lf0OcLhwtKdtBsuz8pwjaCee+MyCi2bBKSmsEdwa/AXCin5BxoPT53fNagGG/7/ISean26lOUgoPihuYDSPmpR3DqoCXGdJQ55LSx2GMCldLUJzNuh44VYAeF2Vi73/VtVpFnoNdyD8z8XGnqWIUXrTA6HQgogjrmjc6mWxpIB3q6IJypsUa+gMI6vJGP9D66wzQWKyWdmP2l/vXrDrEVN7vCufhKw5z+cjq4z+8pj51Q2e/9aNyKXJigZLaiqrRfT90E9Fucf+rYZkOc1Kj8T5fhNVYhb+QJd6WFhSRP2TKb5aASE5vW4IiRh/BFJpdDuV1FrFNRnTswOWhXWkGWJ75BF9A4xROI1NqWDGMXsrA7OpeWdsRWMqr0Hf/OvGgYCdGaaOaf40Oq/hk6ySJV2fHLbzdqeJWMDe0F7yVkBK2w+wqG0P1P3aAJtZ3RSuVyzoo0Kdi2sXI0vkPqYNXGNIJGth+2DLWMy5EV6aKD/I5qz3GmICCI4Uw13le9Hf5/Mu6sLIEQNkmjrLR3iiL/E8cQe8nfjb9/r8CFUJfsJ0/iSTvu4W0eO7QXH2ZxQi50KQ0NEXKvwKDA5/RaBpA1hB8iHHQCYIFzJYCs5XvRmC1vbGn/ATHjDAfgvyI2j9ttUiG70ZAgVdtwuzI44wWXhLYFY59adkPEXnYSG5LeYdRwJ0e6pSpcx4Ek= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(376002)(396003)(39860400002)(136003)(36840700001)(40470700004)(46966006)(2906002)(6666004)(40480700001)(356005)(55016003)(82740400003)(6286002)(41300700001)(26005)(8936002)(82310400005)(54906003)(86362001)(36860700001)(6916009)(186003)(336012)(5660300002)(40460700003)(47076005)(36756003)(70206006)(478600001)(2616005)(66574015)(53546011)(81166007)(4326008)(83380400001)(966005)(16526019)(7696005)(426003)(316002)(1076003)(70586007)(8676002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:09:51.8413 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ba39d42-d20a-48bb-dfd4-08da535d6b0b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1389 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/22. 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/fe09e56cb54c6e32242a349e32d50e4b733687fd Thanks. Xueming Li --- >From fe09e56cb54c6e32242a349e32d50e4b733687fd Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 13 May 2022 10:53:56 +0800 Subject: [PATCH] ethdev: fix possible null pointer access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ] The rte_tel_data_alloc() may return NULL, so the caller should add judgement for it. Fixes: 083b0b310b19 ("ethdev: add common stats for telemetry") Signed-off-by: Chengwen Feng Acked-by: Morten Brørup Reviewed-by: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 8df4b0f6ac..259498342d 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -5628,6 +5628,8 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats, { int q; struct rte_tel_data *q_data = rte_tel_data_alloc(); + if (q_data == NULL) + return; rte_tel_data_start_array(q_data, RTE_TEL_U64_VAL); for (q = 0; q < RTE_ETHDEV_QUEUE_STAT_CNTRS; q++) rte_tel_data_add_array_u64(q_data, q_stats[q]); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:52.705539559 +0800 +++ 0076-ethdev-fix-possible-null-pointer-access.patch 2022-06-21 15:37:49.117784869 +0800 @@ -1 +1 @@ -From 590e988fdfca241d810d6cc94098c223ccb7c737 Mon Sep 17 00:00:00 2001 +From fe09e56cb54c6e32242a349e32d50e4b733687fd Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 590e988fdfca241d810d6cc94098c223ccb7c737 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ - lib/ethdev/rte_ethdev.c | 2 ++ + lib/librte_ethdev/rte_ethdev.c | 2 ++ @@ -22,5 +24,5 @@ -diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c -index dc47543e6b..a175867651 100644 ---- a/lib/ethdev/rte_ethdev.c -+++ b/lib/ethdev/rte_ethdev.c -@@ -5502,6 +5502,8 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats, +diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c +index 8df4b0f6ac..259498342d 100644 +--- a/lib/librte_ethdev/rte_ethdev.c ++++ b/lib/librte_ethdev/rte_ethdev.c +@@ -5628,6 +5628,8 @@ eth_dev_add_port_queue_stats(struct rte_tel_data *d, uint64_t *q_stats,