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 3798145CE3 for ; Mon, 11 Nov 2024 07:41:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16FE94067A; Mon, 11 Nov 2024 07:41:20 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2044.outbound.protection.outlook.com [40.107.212.44]) by mails.dpdk.org (Postfix) with ESMTP id C2DBA40E09 for ; Mon, 11 Nov 2024 07:41:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gywYWU6ojY6zIIvBdc+hRrY/wdFHDd5AGbf8re9rK4qUryMIgyElxZWOiD69uHFc9qlxVYNQRLM4FvqoxSMAhYSYskUR7ZWYypu3pREmJFKHSCvlBOOY4OQZO+jbT4zIJuzTnkIvIHC1Z+0/gMhDDe6sJiI7PDKiOvBLFgpcLH03G8lfwN5dCsmj3b+p8Nq2FRYjGvMET7YkWCQTWSXFkkkcZU1qQDLXvuSkOmqcAY8V5w36BhVf6UmMx/BtZR8QCQMeT1yM3ZrpPNDSDLLw0OUpA+GPovFoYU2vUrzKPgNw/S4Z5ar5wxgwY0iu5kS0zNIZ7Re8SV8INAbMS4TMVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=o4P5sypDOkyebf1LiWOXzrdBk+sJim5I65oVKz1y8WQ=; b=W5BeRglMZc1bbgpCy/ix5w7wWfAHQ00B3OdD+XZymUJLOkNSjRFPGYb7svPytRRA0h/X4OFhT4cPLyMUKzEg4RLc2239xhsLGG2IJDt1s4E1botNOLOGUZ9o56Mwcy18R9q2WewX830hkWOpe2Fc9OX1uBG+3eYoiV1cm4afhu03wK8invoXCIxOZGX3kM0MzPePQh4jqrYbVM+Hfc3cBW9puogLrV04ZOmJIvnCogBtVHAbZdBvHMrjppBzQaA2PxdL41pCvDmqOdZFiO2kamUpDB67yH/vnmLBf8RnBIdhFDU19CJPLCJyk9L9Xu+uHeJx2vxEqBfJnnpAGurr8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=huawei.com 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 (0) 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=o4P5sypDOkyebf1LiWOXzrdBk+sJim5I65oVKz1y8WQ=; b=iLbnzbv3RkG9vpCUnr+JztS3eWCiz6b3Uq9uOQDydMxShOxlxnWYcDA8pSdDQ2m0c3UIPnKBSm8byaDhbtPqZ95ZRqeKjOHV2rTeWeppaCpsTqp9njQZ7Cg826z5RN99fRwqbpjVvFKMp7zEP2MyLUO2oT+9YpNGqAK4VvQiywYP7fF1vwiP3N3gOvBuoGdh/xAhTgBGP10XNjAViLdotVhI9wTnO656so/G0j0UTpCw/XPdzU3OPoNrg6ha5q/oFKa/cu6L0/wcOYski+ogeXb5KcQsvFGtfBECsFnFgz/+rLeNkriTf9wBBLwPZeKCg/YcvTZvBAkqpa6atfP1aQ== Received: from SA1P222CA0050.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::25) by MN2PR12MB4333.namprd12.prod.outlook.com (2603:10b6:208:1d3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:41:15 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:806:2d0:cafe::48) by SA1P222CA0050.outlook.office365.com (2603:10b6:806:2d0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28 via Frontend Transport; Mon, 11 Nov 2024 06:41:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:41:15 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 10 Nov 2024 22:41:02 -0800 Received: from nvidia.com (10.126.231.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.1544.4; Sun, 10 Nov 2024 22:41:01 -0800 From: Xueming Li To: Chengwen Feng CC: , dpdk stable Subject: patch 'dmadev: fix potential null pointer access' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:28:43 +0800 Message-ID: <20241111062847.216344-118-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|MN2PR12MB4333:EE_ X-MS-Office365-Filtering-Correlation-Id: ee15867d-8179-4f0e-d0e3-08dd021bd75c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?OE56AnwUtcnQNuwAVPmIoZR+enByKHvu6agv/o2b4A6WC0fdVQMj+jrrzkwr?= =?us-ascii?Q?SMKJd3CwHUdviS4wTM74/+9VGA0kvLSBD5OIiiqwYeAEx3P36Z80hAGqjzOV?= =?us-ascii?Q?RyTrJg639OLeL1spikpM+l1Wt/27WwWYjdhRxQmieBk2lNQlQMS9/JgIIZKJ?= =?us-ascii?Q?9GLzHvZKuWyfp2JdaV9EoWD324Z6z6j9Tpg7BJrceL4zoF5p39KtwCFiKWQa?= =?us-ascii?Q?OaQE/CRmQwEANAzRcvdjPGISYshbGizxcGHq2Xz1r5qiuhmBoxwtNyYJ/c2W?= =?us-ascii?Q?Qf4FCbYZNeETYPNCvx+7GwikU4RyN5Lg/PbjO88ngI/6XLyuUlSmtIu2Rs+b?= =?us-ascii?Q?QtL52zAmq4TD/EEcbCOSvOkzjXXdOLaioGLsPebwKCwDVW0QNbU65M+jw5QL?= =?us-ascii?Q?Not+FPU74EBtHBpZBbgo61HWJpe08+Nibqd+K7phobRQLGdTvciNvXIpBYWV?= =?us-ascii?Q?gQ36TTsztPMhTICDP24W2Xl2t/mWt6VZb7N4fbNBAFy42//mGUieBQR3Tib1?= =?us-ascii?Q?oPWT1Po0ppcqKD87NLTKs2B36wMYKOp/dI/pqf+3Yf+pLUFMstNH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:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:41:15.5628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee15867d-8179-4f0e-d0e3-08dd021bd75c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4333 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 23.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=43802f5b3729302977db17e78dbeac7ac3a09353 Thanks. Xueming Li --- >From 43802f5b3729302977db17e78dbeac7ac3a09353 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Sat, 12 Oct 2024 17:17:34 +0800 Subject: [PATCH] dmadev: fix potential null pointer access Cc: Xueming Li [ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ] When rte_dma_vchan_status(dev_id, vchan, NULL) is called, a null pointer access is triggered. This patch adds the null pointer checker. Fixes: 5e0f85912754 ("dmadev: add channel status check for testing use") Signed-off-by: Chengwen Feng --- lib/dmadev/rte_dmadev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c index 5093c6e38b..a2e52cc8ff 100644 --- a/lib/dmadev/rte_dmadev.c +++ b/lib/dmadev/rte_dmadev.c @@ -731,7 +731,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status * { struct rte_dma_dev *dev = &rte_dma_devices[dev_id]; - if (!rte_dma_is_valid(dev_id)) + if (!rte_dma_is_valid(dev_id) || status == NULL) return -EINVAL; if (vchan >= dev->data->dev_conf.nb_vchans) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:10.548093632 +0800 +++ 0117-dmadev-fix-potential-null-pointer-access.patch 2024-11-11 14:23:05.352192835 +0800 @@ -1 +1 @@ -From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001 +From 43802f5b3729302977db17e78dbeac7ac3a09353 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index 845727210f..60c3d8ebf6 100644 +index 5093c6e38b..a2e52cc8ff 100644 @@ -22 +24 @@ -@@ -741,7 +741,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status * +@@ -731,7 +731,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *