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 03B9343B86 for ; Tue, 5 Mar 2024 10:50:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F179B4026B; Tue, 5 Mar 2024 10:50:58 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2064.outbound.protection.outlook.com [40.107.94.64]) by mails.dpdk.org (Postfix) with ESMTP id 340E74014F for ; Tue, 5 Mar 2024 10:50:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VZ4rG8MAISw+urKylS2ZwjF4Hhuh3zi4bteF1crmD4EtZAckoQbuO1vnW6CzQTwP+bv0KwcZGsM0EiCVlqEbSENF5CtqHobIYIJ2Vt3LjSS3FpigmtJX2QtUAqvvbqz0mP1HxFdqoztCJpKRDUkIWzC2in/qE5F8rVBselJpJg2WKRlx1Wd3GD7ihjOyjR6HOms6cog5Z8q8fh4W8IKZ3c6CYE3+8PiypJtu88pUgRnfAozG2PxiCAPCdZNizMgv9rY9GIgpnFQaI9EDhpBU2S76p2Yl+S90gZmGJynfWF2qpz/GmhlWrYhEtui3ocHrKJQG+fcNknHRDf5hNu6JRQ== 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=1m3n4QU377nT2kH+4Dz1N26q1583PF6+kEoltLGJpsk=; b=cjc3DoW6XEkmq4v5T6EE+6MKViMKHFrrfZ3cRGg4eIOWFzjCVI1ccVI0f7+FXg4EXv4VduqHjHG9nFJA7Yr8R6oaxVUa2ZRkSoG9/+l1cjxVrqDDZJ+ANBMhVA2XdJRUxq6EvFPIAEZy8amwpBL6TSQ8Eu7ysLaxUQWQ4CgIQbgqPFqsiu90KehcvdJYBQbxLev3PIMSqK3V7yTLSJKolDMS3KoRmhJgkLm6iwoelU+97xDOGTEetTwwYDcKrHfWixXoGjEvnWKDMb29cDRrD8gdftqO0o7meKzt8WY6p19y5kLdfmuBj2O2Pg3Lu2GYmWI2X8aEW7W73WnXzM7t5w== 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=1m3n4QU377nT2kH+4Dz1N26q1583PF6+kEoltLGJpsk=; b=un0/T7IaEhA7CXSDcBIm5CzoFqILTyNQ1JCzNQEuCJHueBrLWCyHzlm03pRa/Pxz0EDdxjaargttw7hytF2h+quqC6znt27auM0O20/rQgof1fKOd3UNgclJ7IJ0lgnY58iCnnJItdkzflD1rDbE9S8POkLJGCCr9Mj/Ec39MWJjgyLZnGDOl7yhSD9zJmshlN6AIoKwogBtbNvrm88wicIbdp3wvJ/e5lsW+wcS6h3aLy8QRJd2ZpxyUwnBXYxSluZScfjp10Jz5CPhkT/qxOOlZ/G5hsXy/85JnBZe/kZT8OQm8WTZGmjBVly0pVQBq+aouFyZoR4otUDXpR3uLQ== Received: from SA1P222CA0195.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c4::8) by PH7PR12MB6417.namprd12.prod.outlook.com (2603:10b6:510:1ff::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 09:50:54 +0000 Received: from SN1PEPF0002BA4C.namprd03.prod.outlook.com (2603:10b6:806:3c4:cafe::6b) by SA1P222CA0195.outlook.office365.com (2603:10b6:806:3c4::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24 via Frontend Transport; Tue, 5 Mar 2024 09:50:54 +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 SN1PEPF0002BA4C.mail.protection.outlook.com (10.167.242.69) 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:50:53 +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:36 -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:34 -0800 From: Xueming Li To: Chengwen Feng CC: Huisong Li , dpdk stable Subject: patch 'bus/vdev: verify strdup return' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:10 +0800 Message-ID: <20240305094757.439387-30-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: SN1PEPF0002BA4C:EE_|PH7PR12MB6417:EE_ X-MS-Office365-Filtering-Correlation-Id: 72a8da0f-de4f-4701-63cf-08dc3cf9bf9a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: luNU8FB+IU+/A28scbkvCK4IDZcj2CdSCB+DqVjbEA6lSjzdfPLHTnMUbbGgWZRp+u8kJtuQ9n7uTizHfGCs+QBC0MORQTsSsGNelyAZZYRv2dKicXbxKpl5GkwsbciJqYhBcnmLKRIi7iMmKxeXo8VdtWTpU3ZnyQTEnOEHlo/aI/D4GZQ1hXmIgWI1wUTRpMwNl1I/DLpv7bBLsg1fF7sTaYBp9mJhE3Y92QZ9sBZigGairMgcpqGjOjYziyCfn4u02mlJn3dDbfVmet6N7mak32ebleFyAlmn98N2RYSlNoxyCfgyXcawclneDcKp56rQEey9VCAqmvQ69RbTeKID5wQOC1tYoSZXH588xuIPxqsDg677BWwvmF9YfucP8jaTVwD4NOAGJQpCd6ptQknMETldmu1GPAyW2ZOaogp2ZeatS5o2tkM9SHu1c1iHC8JGIaqG29CaBn2gqTWK6aetS5UKlAZhkCOxjsaiGSh1KZuIaVTznuyovJGkYUUukKHsEz+YeSrxQBDNR3X3xLjJ5GJq/LGN3BskT8Xiy2Dy87QS/h6uXoZfuPhf1lED98PEDez1Oph/nBX3ugH8EPa0Bmy8F6JVoXKr9edro+xYZ2eXyWVcNs8T9nYCFrE8PoGHEzc7SVaZYhBTwKmKFRsyqHubhCWrzW+gP7mN5HhCKFmX8dS1t65A8ZtzVtegXIVZiEWAa0yZUchfurZ8E5tNwtmx4VaqHVWI3RMLHomgvLlsZYcxnqP99id1tWiW 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)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:50:53.7607 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 72a8da0f-de4f-4701-63cf-08dc3cf9bf9a 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: SN1PEPF0002BA4C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6417 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=b4943e7a51aac2584539eef7d4cbed84b9a3da06 Thanks. Xueming Li --- >From b4943e7a51aac2584539eef7d4cbed84b9a3da06 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 10 Nov 2023 10:01:05 +0000 Subject: [PATCH] bus/vdev: verify strdup return Cc: Xueming Li [ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ] Add verify strdup return value logic. Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage") Signed-off-by: Chengwen Feng Acked-by: Huisong Li --- drivers/bus/vdev/vdev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 7974b27295..05582f1727 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -247,6 +247,10 @@ alloc_devargs(const char *name, const char *args) devargs->data = strdup(args); else devargs->data = strdup(""); + if (devargs->data == NULL) { + free(devargs); + return NULL; + } devargs->args = devargs->data; ret = strlcpy(devargs->name, name, sizeof(devargs->name)); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:31.941769232 +0800 +++ 0029-bus-vdev-verify-strdup-return.patch 2024-03-05 17:39:30.713566491 +0800 @@ -1 +1 @@ -From 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 Mon Sep 17 00:00:00 2001 +From b4943e7a51aac2584539eef7d4cbed84b9a3da06 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 83f275fa8124daf3a6b3e56f4b40a2be4b07a3b4 ] @@ -9 +11,0 @@ -Cc: stable@dpdk.org