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 2D2B243B86 for ; Tue, 5 Mar 2024 10:51:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27ED44026B; Tue, 5 Mar 2024 10:51:17 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by mails.dpdk.org (Postfix) with ESMTP id 796AF4014F for ; Tue, 5 Mar 2024 10:51:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SEYT3lkk6TIhcMXWTkvxvB3DqDHbD8TqzzC/YTEZhJOqicnMGeRQEaxBv0Rf8UPgIHwOS7VvV8nTu4pydfb+Rp0VSqo0fOugehfg9N6Ur6oPn6dv/A0uJc/tJYujExNSSeePYO2GEe6pIRuOWRIK/NjTrFWekNrhCtOq91ut/hTPNv0R1ZO/IqOAEZ2f8HQzjU/lX9zLvSYEfdEsI/HZa1QL5COfyqiyAO/Crpdg1XZCFYNIK5iZXUqdp291P0w/hG27eOV18qFpAIpSFYoQPHlGW2zEEeZVjS8nORdjqXSDPPtoZj7UKgVbRWZMum1pW0/GgAmbbDKEHA16SMmm6w== 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=NFdwAc+Azli49cNMrp3MHJnhBnYX85JQnGmbU0+4tEg=; b=db53BRwD1YzA9VTVC/waoBMKsbqsh+0j6MFHgW4Bn2y3+Knx2d+JfuIH1BFIgUVjQpKz0b6kzWqLezK5iELXY/OmNjbppWMKAFWL941qVm+sLrW5X5MFVt3RiIQBlcCvPbc/ronx9UMHMfcRM69rmOrE4Jp29o5SvONCYHfLcC23N3UKrO/Jw9D32Ov9mSQ1sT1Hi+ez8Hrf2QVc9V7aj64PNUhjcZWPSbuTwGh/G88m6C/c0AQna0+WkY6cNzb8Uwm2q1iaQOpqKsd3K6v3H+M9VwP0PukcNtBVri9gMptP4xHbAjWdNHa204FZO0GtSU8Q8Ay2l5lLDrEIT+xQNQ== 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=NFdwAc+Azli49cNMrp3MHJnhBnYX85JQnGmbU0+4tEg=; b=Ko2Ky8wAYyv/cjebAK7My3Rtdmf1177hg3dFo1wvreonnFsVgFv+MNyLpaIsuUkeF7L8butMyh/qVKYNvJP5G80RemaaRlQYAY5g6NwtrVxZZ6AeavpTqDGwe1EBwbChQdtQTAyiaVxq2GiIi6BJ2t4hIHTqaS/4e6S3c5LOlJ9+SeADOUywO17m1w0bGF73T9Wa5bmDX8806uTdCZKOo1lV6a+DUgvhjK4SHqZB5FQVJvTFyhkgSaF99r63ityOyxmdNMEMsmgtqnAXThTxf0qtU8BmbT5B+1u7awh11QlziGHL8yHDtDqkw+aa2VsdcpSK68eohafeY3+fgsZwDQ== Received: from PH7PR17CA0001.namprd17.prod.outlook.com (2603:10b6:510:324::25) by MW6PR12MB8998.namprd12.prod.outlook.com (2603:10b6:303:249::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:51:12 +0000 Received: from SN1PEPF0002BA4F.namprd03.prod.outlook.com (2603:10b6:510:324:cafe::5f) by PH7PR17CA0001.outlook.office365.com (2603:10b6:510:324::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:51:12 +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 SN1PEPF0002BA4F.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:51:12 +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.986.41; Tue, 5 Mar 2024 01:50:55 -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.1258.12; Tue, 5 Mar 2024 01:50:54 -0800 From: Xueming Li To: Chengwen Feng CC: dpdk stable Subject: patch 'dma/idxd: verify strdup return' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:11 +0800 Message-ID: <20240305094757.439387-31-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-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: SN1PEPF0002BA4F:EE_|MW6PR12MB8998:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b32ee16-1a3f-409d-b0ea-08dc3cf9cacc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xz0/wMScIhwHEcAwTAz7b5aAsBVrG11IW2A9CSXCgbFKUj79d8/JRImuhvXv/ZWJWJSaOR8Gs8m5vjyh+akArgt2cU2GsRkc82wxQuMBG+FBUoXKW9XzSvYtSzZcVd4e/TCpmZjgU+ci5D3BqOQm26z+oNOwOT8mJ71mTkpfYsTHdhIX6kP7MNLIeg2LAT8hK8bIwDk8e8wTmT1Kk91C+jLtiVK2eX6mock7dXcXUhryWXC2lPLPvpOGB8YUFgn/cygJF4ZdiCf7Oygz9/KdVhTp19Q7+X81DT/G+FS8kxcHeOJgyaS7xsanFe9Lemb4oFOh4NCrtdTyis10neDXvErkG6Vbt6RirFDrkLHfomSIiaL7UB9YQgmyBCcd6l3pv7cQYgSQ64AXg2D5g0nrv/iszPDzdZ9MBzxf4DYMAdvbTLzboNiOFNa3wGh36aqAuwRxFCBNjRWLL94HKBiwKDZo6ZaTyC8kU215rKY0iA65NE9e/9VKZUp7qWftFsgbJnozW71UaurgQRF2iE4WAfBMRTBtORCUB54V56luFw+GYjYFIdk6vM/swK2ApBjbSfZXBHz6zZgKuFq+cFvJDR0U7/DDdFsNYTTbtdVt1+zUGpsCOPhVvYXlSPePJujVGbgZLlxw4C1Kh7hn2gwwaVW1s8cz3/NisDNa/5APPH8GWyK4r3rPXdHWiXitYuYkz2FLaCBkyxamMMwDk/WTwIizjdRrWcGHntF1OgfLpo3Ixg/oJaywrSRdEPkH99sb X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(82310400014)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:51:12.5297 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b32ee16-1a3f-409d-b0ea-08dc3cf9cacc 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: SN1PEPF0002BA4F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8998 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/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=df74839ea1d53002f0d56b0045a6b23b391e487d Thanks. Xueming Li --- >From df74839ea1d53002f0d56b0045a6b23b391e487d Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 10 Nov 2023 10:01:06 +0000 Subject: [PATCH] dma/idxd: verify strdup return Cc: Xueming Li [ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ] Add verify strdup return value logic. Fixes: e888bb1278c6 ("dma/idxd: add bus device probing") Signed-off-by: Chengwen Feng --- drivers/dma/idxd/idxd_bus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/dma/idxd/idxd_bus.c b/drivers/dma/idxd/idxd_bus.c index 3b2d4c2b65..ba8076715d 100644 --- a/drivers/dma/idxd/idxd_bus.c +++ b/drivers/dma/idxd/idxd_bus.c @@ -261,9 +261,15 @@ static int is_for_this_process_use(struct rte_dsa_device *dev, const char *name) { char *runtime_dir = strdup(rte_eal_get_runtime_dir()); - char *prefix = basename(runtime_dir); - int prefixlen = strlen(prefix); int retval = 0; + int prefixlen; + char *prefix; + + if (runtime_dir == NULL) + return retval; + + prefix = basename(runtime_dir); + prefixlen = strlen(prefix); if (strncmp(name, "dpdk_", 5) == 0) retval = 1; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:31.966258033 +0800 +++ 0030-dma-idxd-verify-strdup-return.patch 2024-03-05 17:39:30.713566491 +0800 @@ -1 +1 @@ -From 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c Mon Sep 17 00:00:00 2001 +From df74839ea1d53002f0d56b0045a6b23b391e487d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 83cfa2cbf3f3fb78e2f2dd228109adcb38e18a5c ] @@ -9 +11,0 @@ -Cc: stable@dpdk.org