From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.99]) by mx.groups.io with SMTP id smtpd.web11.4340.1681460403419172507 for ; Fri, 14 Apr 2023 01:20:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=o5HBXxJd; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.99, mailfrom: minhnguyen@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P4Mxl8OL/8XXFQe3GBIjPstMYvtvVf4kU2Jq4/WVWsXozVRRZFAEAbGhHiVInHBT86HOGd9WTujnQH+55/kIAjghyXAiYwZIlhfTQFF0rWZxtihLdiQeWRSD7qj1fkqokp3oysFe4S0fDVBWLpf3kTCvUuIkj7dh+KfunRBsFSp8YNStuuhrooXN6eKxBngk0jJZKF5VoefxTt1zvM/6xMxZZ6mTTxYZ9nyg3OLhtivl3N3k+3m3yvqHD/rY7AJ5GDVNOYZWJTfAPFna6VzO6TSmQw5v0zJTY2YzcZHZrXeDnQTIHt3LE9Fr/AhI1F0Ql/YFBtpcYPxeY5IUheoG1A== 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=KiGUt8dukwxot//CvIiU9/mToX+uso0JJi0l9cgp+Ss=; b=XG0E6AtvqeDcjm56VPH4hAhP4AuhCiDPToMUv3Y2xQYwUx2z1Iu5O2aEDx62YtA4/6o+CnvXZVWGzZhFrEo0MSPaQFd3EgLKADsOHXUePL/oV3hakx7CgN5p/FDxlx3x5OqOkNJwrRHsmPwqW3/HPn+TmNezV8lWxEAcRfvYFt3jqqj2dz81AvsK5/MF7l+1ZC7sk/rqDrGHLUoxAMojtNjp1Wxn65NjssXO33ll0LlISCjtHTw29PlgPiPQxl5y3Et4d2FGkQ/zrIkszxjQBJMiR1ykqnUZGQHezWmkuKBH2QQ/rbqvjypueglT7Pbw/KRmADUK+UYZAzEWKFsr9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KiGUt8dukwxot//CvIiU9/mToX+uso0JJi0l9cgp+Ss=; b=o5HBXxJdgXEuM0f+Ot38gDkNByjgEOhoSSqiM09e7VXVKh4IIvEPmFNMZmIEMYzr4eAVSBo9CJAWOXOPRfDqLqZMsz1YxdnkMdGV9CNUE5jTsD9IfgXq++97QhkjEu1uE7iF0W9zXuu5fmF9INrG7/LYiB5nbZvuGyZLDNymIOU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from BYAPR01MB4038.prod.exchangelabs.com (2603:10b6:a03:5b::28) by LV2PR01MB7599.prod.exchangelabs.com (2603:10b6:408:17c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.6; Fri, 14 Apr 2023 08:20:01 +0000 Received: from BYAPR01MB4038.prod.exchangelabs.com ([fe80::ca46:c19a:9542:40a6]) by BYAPR01MB4038.prod.exchangelabs.com ([fe80::ca46:c19a:9542:40a6%7]) with mapi id 15.20.6298.030; Fri, 14 Apr 2023 08:20:00 +0000 From: Minh Nguyen To: devel@edk2.groups.io CC: patches@amperecomputing.com, abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, nhi@os.amperecomputing.com, tinhnguyen@os.amperecomputing.com, Vu Nguyen , Minh Nguyen Subject: [PATCH 2/5] RedfishPkg: Prevent assertion of allocate zero length region Date: Fri, 14 Apr 2023 15:19:00 +0700 Message-ID: <20230414081903.7892-3-minhnguyen@os.amperecomputing.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230414081903.7892-1-minhnguyen@os.amperecomputing.com> References: <20230414081903.7892-1-minhnguyen@os.amperecomputing.com> X-ClientProxiedBy: SI1PR02CA0037.apcprd02.prod.outlook.com (2603:1096:4:1f6::13) To BYAPR01MB4038.prod.exchangelabs.com (2603:10b6:a03:5b::28) Return-Path: minhnguyen@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR01MB4038:EE_|LV2PR01MB7599:EE_ X-MS-Office365-Filtering-Correlation-Id: 717210d3-82d7-465a-70d7-08db3cc10a82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zpuWaYnSzQ2SZkYRRhHa6oxtORrm3ckGeoWfVUlavTffg3TPtyg6NROrdO81fC2UpRwtoWBJlC3NHwKEEUrcsdQO6KDS3alc4pp/ywxoYG0d8I4Rk2E8gLllr5hyX13sZXiiB9ASDOkY6IAvLEqH9+vN9jiwKTfPNtcc+OxxkZ05v37yn6mExHj1/c/jIcIoMCB+7jPV/JmEQ7w+WkMcWNbO9jFuhmiBG1kWNWgsjXeZFKEIEDYV9EcDsxKrzuiopjgup5MmqDg/JoPj1ov11djpGcii8jUc5E+axcopFs7HvMfNEQJd5VofOE/HrksSqPnVJCqRjg3TKqm6kshX4jTuUt5duzQpVR24Fx6GXgrhDwTwyXhjCZYyjfs2rYcrEInN7h8KuOb0/+EGBheHMIWfZWIgieYrlKjMJkhgNLpFXu9H1mECeM10MSa/SOpUYjFSNtpAoFtPET2AWTCINF7wgDcFkmYynTyM606pY5jOYFzu6odJ0hHee4GZxLFSItWNt7m5l7E9iKi/Sx/C4QKfrt5o2rKd0rFmY+QYafqfN+g9s5CtWq6dr9+W2zLa+l4I5/5u6D8Cj7KPRIMAgzQ4SZR2gTG3b9l7MGBfnf0Zb60f+3fyvCEHQ1V853/3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR01MB4038.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(136003)(39850400004)(366004)(396003)(451199021)(478600001)(107886003)(54906003)(8676002)(8936002)(86362001)(26005)(1076003)(6512007)(6506007)(38100700002)(316002)(38350700002)(52116002)(6486002)(186003)(6916009)(4326008)(66556008)(66476007)(66946007)(41300700001)(83380400001)(5660300002)(2906002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2Jsng+ZtX7L7T7+3lgPv7puADGBVEOFJs14YW1xPCj9trXaHBEsXSWBf8oRB?= =?us-ascii?Q?/ahHh3ADmaF60czEsZLPq15qz3oxCJH+FnaFVVoqnKVU+PerDWUu3oOH1Lo9?= =?us-ascii?Q?99OrBd/ggp9dupJ4QzQ026XwbnndfilY3ypf2kkEJPUkDDCmfmuTfmVPZbPZ?= =?us-ascii?Q?H6gA+BdRKBitIw7EowGP0Tb6cEXL5zP2uaZ5pvZDoEOE4sC3wdieU19yX5lK?= =?us-ascii?Q?wziT0gcmx7v36zoPS//iqgwmn1nXdREi8u5B6TTFNR0sTcY6u04qpgsHT7Hq?= =?us-ascii?Q?Xpn3gQT1hbw494Z7DlvBpV5Lw4CYTNOYjeIQjZmvcXAK7Rmx6/yJuxW7JIQx?= =?us-ascii?Q?5rU8sXqmapFYQT7Zv287IlnbeQ3YlGFqtBFgj5qpkrlWxKeHX8uhALlf1ECs?= =?us-ascii?Q?YL2cu4TIBQkWzEGub1LtVEP2hyntz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Mj?= =?us-ascii?Q?B8Mi2O+et4YbMu5+3eFkZfgW/ZmgLU8Yv+UMBGulvx6gvOEwCDLpSvE894Me?= =?us-ascii?Q?Jar+CNilZzbWUJH13KOF1V4PHHFoadHibr+pRC0TgiF2s8n8HA5v09+GOx9J?= =?us-ascii?Q?roOrEgwWQwnE8OvnUtCdZuB4GEEQ2Rmm0t3ZZ/gkc8i/ZsiFfkJ/WALNveTy?= =?us-ascii?Q?9jRYMZiYuG0Zb6vz4PE8ghL/66Od01halRomOsVGS+P+MRevEw3iFS60ISsn?= =?us-ascii?Q?aI2VXo7pqJz2I45lW4nL8UvhAdNkyq1LzR+K9/KeA4jYtZig6bqodJ6+/uxj?= =?us-ascii?Q?o5+UuQqRgid4bux/Sfqm0XwJoNXvRLt7pLaIDZ+dBOrx?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 717210d3-82d7-465a-70d7-08db3cc10a82 X-MS-Exchange-CrossTenant-AuthSource: BYAPR01MB4038.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 08:20:00.8024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F5/+KSQ1Y4GNJxK0VBHij5T5v6r6XQpUEK31CTtulkNaOGWgSDZpwdV+uPxtIcmS38tHTPh0hkyACQKxSBeLTabr9xdt+mfKPYP5xYLAf66vh6PYOxJkyQJhDwLlRnon X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR01MB7599 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Vu Nguyen This change also fix miscellaneous errors on condition checking and debug argument missing. Signed-off-by: Minh Nguyen --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 583c6f78e19c..29e7b0624ebf 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -5,6 +5,7 @@ (C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -272,7 +273,7 @@ Tcp6GetSubnetInfo ( if (IpModedata.AddressCount =3D=3D 0) { DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __func__)); Instance->SubnetAddrInfoIPv6Number =3D 0; - return EFI_SUCCESS; + return EFI_NOT_FOUND; } =20 if (Instance->SubnetAddrInfoIPv6 !=3D NULL) { @@ -926,7 +927,7 @@ AddAndSignalNewRedfishService ( } =20 Status =3D gBS->SignalEvent (Instance->DiscoverToken->Event); - if (!EFI_ERROR (Status)) { + if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __func__)); } } --=20 2.39.0