* [edk2-devel] [edk2-redfish-client][PATCH v3 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT
2023-12-22 22:41 [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes Mike Maslenkin
@ 2023-12-22 22:41 ` Mike Maslenkin
2023-12-22 22:41 ` [edk2-devel] [edk2-redfish-client][PATCH v3 2/3] RedfishClientPkg: fix typo in EfiRestJsonStructureProtocolIsReady Mike Maslenkin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mike Maslenkin @ 2023-12-22 22:41 UTC (permalink / raw)
To: devel; +Cc: abner.chang, nicklew, igork, Mike Maslenkin
Initially RedfishPlatformConfigGetConfigureLang could return success
even if ConfigureLangList is empty. After fixing this condition,
RedfishPlatformConfigGetConfigureLang returns an error, but this doesn't
help to avoid ASSERT because the error path is the same as for non-empty
list.
Cc: Igor Kulchytskyy <igork@ami.com>
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
---
.../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index 4cb7621c25c4..0f0b050d7eba 100644
--- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -3118,7 +3118,9 @@ LeaveFunction:
FreePool (ConfigureLangBuffer);
}
- FreePool (ConfigureLangList);
+ if (ConfigureLangList != NULL) {
+ FreePool (ConfigureLangList);
+ }
*NumberOfValues = (UINT32)ListCount;
return FirstEmptyPropKeyValueList;
--
2.32.0 (Apple Git-132)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112849): https://edk2.groups.io/g/devel/message/112849
Mute This Topic: https://groups.io/mt/103326960/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [edk2-devel] [edk2-redfish-client][PATCH v3 2/3] RedfishClientPkg: fix typo in EfiRestJsonStructureProtocolIsReady
2023-12-22 22:41 [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes Mike Maslenkin
2023-12-22 22:41 ` [edk2-devel] [edk2-redfish-client][PATCH v3 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Mike Maslenkin
@ 2023-12-22 22:41 ` Mike Maslenkin
2023-12-22 22:41 ` [edk2-devel] [edk2-redfish-client][PATCH v3 3/3] RedfishClientPkg: fix access to unitialized variable Mike Maslenkin
2023-12-25 12:31 ` [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes Nickle Wang via groups.io
3 siblings, 0 replies; 5+ messages in thread
From: Mike Maslenkin @ 2023-12-22 22:41 UTC (permalink / raw)
To: devel; +Cc: abner.chang, nicklew, igork, Mike Maslenkin
Cc: Igor Kulchytskyy <igork@ami.com>
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
---
RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
index 8b9bdc313832..85dc546120e2 100644
--- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
+++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
@@ -562,7 +562,7 @@ EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL mRedfishConfigHandler = {
**/
VOID
EFIAPI
-EfiRestJasonStructureProtocolIsReady (
+EfiRestJsonStructureProtocolIsReady (
IN EFI_EVENT Event,
IN VOID *Context
)
@@ -829,7 +829,7 @@ RedfishResourceEntryPoint (
EfiCreateProtocolNotifyEvent (
&gEfiRestJsonStructureProtocolGuid,
TPL_CALLBACK,
- EfiRestJasonStructureProtocolIsReady,
+ EfiRestJsonStructureProtocolIsReady,
NULL,
&Registration
);
--
2.32.0 (Apple Git-132)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112850): https://edk2.groups.io/g/devel/message/112850
Mute This Topic: https://groups.io/mt/103326961/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [edk2-devel] [edk2-redfish-client][PATCH v3 3/3] RedfishClientPkg: fix access to unitialized variable.
2023-12-22 22:41 [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes Mike Maslenkin
2023-12-22 22:41 ` [edk2-devel] [edk2-redfish-client][PATCH v3 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Mike Maslenkin
2023-12-22 22:41 ` [edk2-devel] [edk2-redfish-client][PATCH v3 2/3] RedfishClientPkg: fix typo in EfiRestJsonStructureProtocolIsReady Mike Maslenkin
@ 2023-12-22 22:41 ` Mike Maslenkin
2023-12-25 12:31 ` [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes Nickle Wang via groups.io
3 siblings, 0 replies; 5+ messages in thread
From: Mike Maslenkin @ 2023-12-22 22:41 UTC (permalink / raw)
To: devel; +Cc: abner.chang, nicklew, igork, Mike Maslenkin
It is possible that at the time of accessing to AsciiLocation pointer
the memory is not allocated.
Also gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) emits a warning for
this case:
RedfishFeatureUtilityLib.c:1889:37: error: 'AsciiLocation' may be used uninitialized in this function [-Werror=maybe-uninitialized]
*Location = StrAsciiToUnicode (AsciiLocation);
Cc: Igor Kulchytskyy <igork@ami.com>
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
---
.../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index 0f0b050d7eba..01c054ae3b70 100644
--- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -1856,7 +1856,8 @@ GetEtagAndLocation (
}
if (Location != NULL) {
- *Location = NULL;
+ *Location = NULL;
+ AsciiLocation = NULL;
if (*(Response->StatusCode) == HTTP_STATUS_200_OK) {
Header = HttpFindHeader (Response->HeaderCount, Response->Headers, HTTP_HEADER_LOCATION);
--
2.32.0 (Apple Git-132)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112851): https://edk2.groups.io/g/devel/message/112851
Mute This Topic: https://groups.io/mt/103326962/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes
2023-12-22 22:41 [edk2-devel] [edk2-redfish-client][PATCH v3 0/3] change method for provisioning + minor fixes Mike Maslenkin
` (2 preceding siblings ...)
2023-12-22 22:41 ` [edk2-devel] [edk2-redfish-client][PATCH v3 3/3] RedfishClientPkg: fix access to unitialized variable Mike Maslenkin
@ 2023-12-25 12:31 ` Nickle Wang via groups.io
3 siblings, 0 replies; 5+ messages in thread
From: Nickle Wang via groups.io @ 2023-12-25 12:31 UTC (permalink / raw)
To: Mike Maslenkin, devel@edk2.groups.io; +Cc: abner.chang@amd.com, igork@ami.com
I merged this patch series.
Thanks,
Nickle
> -----Original Message-----
> From: Mike Maslenkin <mike.maslenkin@gmail.com>
> Sent: Saturday, December 23, 2023 6:41 AM
> To: devel@edk2.groups.io
> Cc: abner.chang@amd.com; Nickle Wang <nicklew@nvidia.com>;
> igork@ami.com; Mike Maslenkin <mike.maslenkin@gmail.com>
> Subject: [edk2-redfish-client][PATCH v3 0/3] change method for provisioning +
> minor fixes
>
> External email: Use caution opening links or attachments
>
>
> This patch set contains minor fixes.
> I have not added any copyrights as I have nothing to claim in this set.
>
> diff from v2:
> added Abner's RB tag
>
> diff from v1:
> original patch 4/4 with change related to BIOS resources provisioning removed.
>
> PR:
> https://github.co/
> m%2Ftianocore%2Fedk2-redfish-
> client%2Fpull%2F64&data=05%7C02%7Cnicklew%40nvidia.com%7C59e8b92865
> 9245e7299a08dc033f1d42%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0
> %7C638388816828154816%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C
> &sdata=yBDjkiMfsBqMqXYeGA7TV3dnlIVLeYLcHNPxWKqkxn0%3D&reserved=0
>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#112883): https://edk2.groups.io/g/devel/message/112883
Mute This Topic: https://groups.io/mt/103326959/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread