Hi Roy, I have just pinged the MdeModulePkg maintainer for the MnpDxe patch I sent 7 months ago. If I am lucky my patch might get some consideration from the maintainer and get merged...
Have a look at the EDK2 mailing-list, you might have a chance to get your change after mine. Your patch looks correct, but I am not the maintainer of this package.
Thanks, Olivier
-----Original Message----- From: Roy Franz [mailto:roy.franz@linaro.org] Sent: 07 February 2014 04:53 To: linaro-uefi@lists.linaro.org; Olivier Martin Cc: Roy Franz Subject: [PATCH 1/3] Mnp Error handling
Change MnpGetModeData() handling of return status from SnpStatus to not consider EFI_NOT_STARTED an error, similar to how Ip4ConfigDriverBindingStart() handles it.
Without this change, Ip4ConfigDriverBindingStart() considers the Mnp->GetModeData successful even though the SnpMode parameter is unchanged, and is full of unitialized stack data.
If this change is not correct, then other error handling changes need to be made in Ip4ConfigDriverBindingStart() so that uninitialized data from the stack is not used.
Signed-off-by: Roy Franz roy.franz@linaro.org Contributed-under: TianoCore Contribution Agreement 1.0
MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c index 795f063..c628991 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c @@ -80,7 +80,7 @@ MnpGetModeData ( // will be updated to reflect any change of media status // Status = Snp->GetStatus (Snp, &InterruptStatus, NULL);
- if (!EFI_ERROR (Status)) {
- if (!EFI_ERROR (Status) || (Status == EFI_NOT_STARTED)) { CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData)); } }
-- 1.7.10.4