* Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
@ 2019-08-29 16:32 Jayanth.Raghuram
2019-09-02 4:15 ` Liming Gao
[not found] ` <15C083E9BA6B755C.32459@groups.io>
0 siblings, 2 replies; 3+ messages in thread
From: Jayanth.Raghuram @ 2019-08-29 16:32 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]
Hi Liming,
per your recommendation,
Please review the below [PATCH v2] and the commit can be found in: git@github.com:JayRaghuram/edk2.git<mailto:git@github.com:JayRaghuram/edk2.git> (https://github.com/JayRaghuram/edk2)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138
________________________________
>From 95c48454d6d14cb7537dec98d58f7dc01efa644e Mon Sep 17 00:00:00 2001
Message-Id: <95c48454d6d14cb7537dec98d58f7dc01efa644e.1567095734.git.Jayanth_Raghuram@Dell.com>
From: Jayanth Raghuram <Jayanth_Raghuram@Dell.com>
Date: Thu, 29 Aug 2019 11:17:09 -0500
Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138
Added checks for return parameters of GetSupportedTypes
function calls in InternalHstiFindAip to improve error handling.
An issue was observed on Dell Poweredge R740, where the Dell
PERC H740P controller UEFI driver returned InfoTypesBuffer = NULL,
InfoTypesBufferCount = 0 and caused an FreePool assert.
Signed-off-by: Jayanth Raghuram <Jayanth.Raghuram@Dell.com>
Cc: Wei G Liu <Wei_G_Liu@Dell.com>
---
MdePkg/Library/DxeHstiLib/HstiDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index 9466e3dcb3..4e1c67616b 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -77,7 +77,7 @@ InternalHstiFindAip (
&InfoTypesBuffer,
&InfoTypesBufferCount
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (InfoTypesBuffer == NULL) || (InfoTypesBufferCount == 0)) {
continue;
}
--
2.19.1.windows.1
________________________________
Regards
Jayanth Raghuram
DellEMC | Server Platform BIOS
office + 1 512 723 1470
[-- Attachment #2: Type: text/html, Size: 7172 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
2019-08-29 16:32 Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling Jayanth.Raghuram
@ 2019-09-02 4:15 ` Liming Gao
[not found] ` <15C083E9BA6B755C.32459@groups.io>
1 sibling, 0 replies; 3+ messages in thread
From: Liming Gao @ 2019-09-02 4:15 UTC (permalink / raw)
To: devel@edk2.groups.io, Jayanth.Raghuram@dell.com
[-- Attachment #1: Type: text/plain, Size: 2414 bytes --]
This change is good to me. Reviewed-by: Liming Gao <liming.gao@intel.com>
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Jayanth.Raghuram@dell.com
Sent: Friday, August 30, 2019 12:32 AM
To: devel@edk2.groups.io
Subject: [edk2-devel] Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
Hi Liming,
per your recommendation,
Please review the below [PATCH v2] and the commit can be found in: git@github.com:JayRaghuram/edk2.git<mailto:git@github.com:JayRaghuram/edk2.git> (https://github.com/JayRaghuram/edk2)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138
________________________________
>From 95c48454d6d14cb7537dec98d58f7dc01efa644e Mon Sep 17 00:00:00 2001
Message-Id: <95c48454d6d14cb7537dec98d58f7dc01efa644e.1567095734.git.Jayanth_Raghuram@Dell.com<mailto:95c48454d6d14cb7537dec98d58f7dc01efa644e.1567095734.git.Jayanth_Raghuram@Dell.com>>
From: Jayanth Raghuram <Jayanth_Raghuram@Dell.com<mailto:Jayanth_Raghuram@Dell.com>>
Date: Thu, 29 Aug 2019 11:17:09 -0500
Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138
Added checks for return parameters of GetSupportedTypes
function calls in InternalHstiFindAip to improve error handling.
An issue was observed on Dell Poweredge R740, where the Dell
PERC H740P controller UEFI driver returned InfoTypesBuffer = NULL,
InfoTypesBufferCount = 0 and caused an FreePool assert.
Signed-off-by: Jayanth Raghuram <Jayanth.Raghuram@Dell.com<mailto:Jayanth.Raghuram@Dell.com>>
Cc: Wei G Liu <Wei_G_Liu@Dell.com<mailto:Wei_G_Liu@Dell.com>>
---
MdePkg/Library/DxeHstiLib/HstiDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index 9466e3dcb3..4e1c67616b 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -77,7 +77,7 @@ InternalHstiFindAip (
&InfoTypesBuffer,
&InfoTypesBufferCount
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (InfoTypesBuffer == NULL) || (InfoTypesBufferCount == 0)) {
continue;
}
--
2.19.1.windows.1
________________________________
Regards
Jayanth Raghuram
DellEMC | Server Platform BIOS
office + 1 512 723 1470
[-- Attachment #2: Type: text/html, Size: 10036 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
[not found] ` <15C083E9BA6B755C.32459@groups.io>
@ 2019-09-02 14:44 ` Liming Gao
0 siblings, 0 replies; 3+ messages in thread
From: Liming Gao @ 2019-09-02 14:44 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Liming, Jayanth.Raghuram@dell.com
[-- Attachment #1: Type: text/plain, Size: 2870 bytes --]
Push @17f8c9e97d770c74f84194576bcd97322fbed21e
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Liming Gao
Sent: Monday, September 2, 2019 12:15 PM
To: devel@edk2.groups.io; Jayanth.Raghuram@dell.com
Subject: Re: [edk2-devel] Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
This change is good to me. Reviewed-by: Liming Gao <liming.gao@intel.com<mailto:liming.gao@intel.com>>
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> [mailto:devel@edk2.groups.io] On Behalf Of Jayanth.Raghuram@dell.com<mailto:Jayanth.Raghuram@dell.com>
Sent: Friday, August 30, 2019 12:32 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Subject: [edk2-devel] Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
Hi Liming,
per your recommendation,
Please review the below [PATCH v2] and the commit can be found in: git@github.com:JayRaghuram/edk2.git<mailto:git@github.com:JayRaghuram/edk2.git> (https://github.com/JayRaghuram/edk2)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138
________________________________
>From 95c48454d6d14cb7537dec98d58f7dc01efa644e Mon Sep 17 00:00:00 2001
Message-Id: <95c48454d6d14cb7537dec98d58f7dc01efa644e.1567095734.git.Jayanth_Raghuram@Dell.com<mailto:95c48454d6d14cb7537dec98d58f7dc01efa644e.1567095734.git.Jayanth_Raghuram@Dell.com>>
From: Jayanth Raghuram <Jayanth_Raghuram@Dell.com<mailto:Jayanth_Raghuram@Dell.com>>
Date: Thu, 29 Aug 2019 11:17:09 -0500
Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138
Added checks for return parameters of GetSupportedTypes
function calls in InternalHstiFindAip to improve error handling.
An issue was observed on Dell Poweredge R740, where the Dell
PERC H740P controller UEFI driver returned InfoTypesBuffer = NULL,
InfoTypesBufferCount = 0 and caused an FreePool assert.
Signed-off-by: Jayanth Raghuram <Jayanth.Raghuram@Dell.com<mailto:Jayanth.Raghuram@Dell.com>>
Cc: Wei G Liu <Wei_G_Liu@Dell.com<mailto:Wei_G_Liu@Dell.com>>
---
MdePkg/Library/DxeHstiLib/HstiDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index 9466e3dcb3..4e1c67616b 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -77,7 +77,7 @@ InternalHstiFindAip (
&InfoTypesBuffer,
&InfoTypesBufferCount
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (InfoTypesBuffer == NULL) || (InfoTypesBufferCount == 0)) {
continue;
}
--
2.19.1.windows.1
________________________________
Regards
Jayanth Raghuram
DellEMC | Server Platform BIOS
office + 1 512 723 1470
[-- Attachment #2: Type: text/html, Size: 11359 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-02 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-29 16:32 Subject: [PATCH v2] MdePkg/DxeHstiLib: Added checks to improve error handling Jayanth.Raghuram
2019-09-02 4:15 ` Liming Gao
[not found] ` <15C083E9BA6B755C.32459@groups.io>
2019-09-02 14:44 ` [edk2-devel] " Liming Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox