Skip to content

Commit

Permalink
Fix shutdown race condition and task start error in IPMI SEL library
Browse files Browse the repository at this point in the history
- Load libipmiext.so with START_TASK option, in order to notify error logger
that errors can now propagate down to BMC via IPMI.  Previously and erroneously,
the library was loaded with the INIT_TASK option, preventing any SELs from
flowing down to BMC.

- Force IpmiSEL constructor to run when libipmiext.so is loaded, in order to
register the shutdown handler with the init service.  Without this, it's
possible for the IpmiSEL constructor to run during shutdown itself, which
down not handle new shutdown handler registrations properly.

Change-Id: If333a8a6e1ce1ad8ca405dc2bb80fca3905ae674
CQ: SW451419
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69092
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: ANDREW R. JEFFERY <andrewrj@au1.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Nick Bofferding authored and dcrowell77 committed Nov 28, 2018
1 parent c112438 commit eaa2604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/usr/initservice/extinitsvc/extinitsvctasks.H
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const TaskInfo g_exttaskinfolist[] = {
NULL, // no ptr to fnct
{

INIT_TASK, // task type
START_TASK, // task type
EXT_IMAGE, // Extended Module
}
},
Expand Down
4 changes: 4 additions & 0 deletions src/usr/ipmiext/ipmisel.C
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,10 @@ void IpmiSEL::execute(void)
*/
void IpmiSEL::errlEnable(errlHndl_t& o_errl)
{
// Force constructor to run immediately in order to register the shutdown
// handler.
Singleton<IpmiSEL>::instance();

// call ErrlManager function - tell him that IPMI is ready!
ERRORLOG::ErrlManager::errlResourceReady(ERRORLOG::IPMI);
}
Expand Down

0 comments on commit eaa2604

Please sign in to comment.