Hi Laszlo,

Thanks for the comments.
As you know, Variable Write Arch Protocol is an Arch protocol, if the variable 
driver didn't install it and directly return, it might bring system hang since 
some drivers that depend on this Arch protocol could not be dispatched. So here 
we prefer installing this Arch protocol to continue boot, even some Variable 
service might fail.

Thanks,
Guo

-----Original Message-----
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Thursday, March 20, 2014 4:55 AM
To: Dong, Guo
Cc: edk2-devel list
Subject: missing return statements in r15339?

Hi,

this commit replaces some ASSERT_EFI_ERROR()s with DEBUG ((EFI_D_ERROR, ...)), 
plus a return.

However:

FtwNotificationEvent() in
[SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c] omits the return, 
and now ignores (beyond logging) the return value of 
VariableWriteServiceInitialize().

If the latter function fails, we go on to install a non-functional Variable 
Write Arch Protocol, and close the event. I think it would be more appropriate 
to return as soon as we detect the problem, and leave the protocol notify event 
/ function in place. (We should possibly roll back some partial changes too, 
from the earlier parts of the function too; I didn't check.)

Same for SmmFtwNotificationEvent() in
[SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableSmm.c].

I could certainly be missing something though.

Thanks,
Laszlo

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to