X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPiSmmCore%2FHandle.c;h=19faac8444141626673dd8974c9d9ae89bc7ccac;hp=9cedb2aeb5ee165b84614fe0eebf60f9d9f090e5;hb=c01f13d52a85f097e1cc6b194df1316a3ed24710;hpb=b243ead0aa6b0ca904a5b3f30d31e2917dda360f diff --git a/MdeModulePkg/Core/PiSmmCore/Handle.c b/MdeModulePkg/Core/PiSmmCore/Handle.c index 9cedb2aeb5..19faac8444 100644 --- a/MdeModulePkg/Core/PiSmmCore/Handle.c +++ b/MdeModulePkg/Core/PiSmmCore/Handle.c @@ -1,7 +1,7 @@ /** @file SMM handle & protocol handling. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -287,11 +287,12 @@ SmmInstallProtocolInterfaceNotify ( // in the system // InsertTailList (&gHandleList, &Handle->AllHandles); - } - - Status = SmmValidateHandle (Handle); - if (EFI_ERROR (Status)) { - goto Done; + } else { + Status = SmmValidateHandle (Handle); + if (EFI_ERROR (Status)) { + DEBUG((DEBUG_ERROR, "SmmInstallProtocolInterface: input handle at 0x%x is invalid\n", Handle)); + goto Done; + } } // @@ -340,6 +341,7 @@ Done: if (Prot != NULL) { FreePool (Prot); } + DEBUG((DEBUG_ERROR, "SmmInstallProtocolInterface: %g %p failed with %r\n", Protocol, Interface, Status)); } return Status; }