You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit fixes two issues in Hostboot runtime code:
1. The constructor of the runtime PNOR component makes several PLDM
requests. If an error happens during these PLDM requests, an error
is created, which itself makes an attempt to access PNOR through
the same RtPnor Singleton instance. This causes the constructor of
the Singleton class' RtPnor instance to be re-entered. This is
undefined behavior in C++, and in HBRT it results in a deadlock as
the thread accessing the Singleton waits on itself to finish
initializing the Singleton.
A similar cycle exists for the ErrlManager Singleton instance; when
creating an error, the ErrlEntry constructor requests a unique ID
for itself from the ErrlManager singleton, which initializes
it. The constructor accesses PNOR, which can fail, which in turn
creates another error, which accesses the ErrlManager again,
resulting in a deadlock.
This commit fixes these issues by separating the constructors from
the initialization of these classes, so that recursive uses don't
cause problems.
2. Re-entrant constructors in local static variables previously caused
deadlocks. This commit changes the mutex code to assert when it
detects that a static variable is already mid-initialization to
avert an impending deadlock.
Change-Id: I7a61636820776173206865726520626f69696969
RTC: 299918
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/130043
Tested-by: Jenkins OP Build CI <[email protected]>
Tested-by: Jenkins Server <[email protected]>
Tested-by: FSP CI Jenkins <[email protected]>
Reviewed-by: Matt Derksen <[email protected]>
Reviewed-by: Isaac Salem <[email protected]>
Tested-by: Jenkins Combined Simics CI <[email protected]>
Tested-by: Jenkins OP HW <[email protected]>
Tested-by: Hostboot CI <[email protected]>
Reviewed-by: Daniel M Crowell <[email protected]>
0 commit comments