mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 17:54:52 +00:00
Correct SYSINIT execution order in the case when KLD contains more
than one SYSINIT with the same 'subsystem' id and different 'order' id. Reviewed by: peter
This commit is contained in:
parent
b0f768ec1d
commit
2ff087318a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62860
|
@ -127,7 +127,7 @@ linker_file_sysinit(linker_file_t lf)
|
|||
*/
|
||||
for (sipp = (struct sysinit **)sysinits->ls_items; *sipp; sipp++) {
|
||||
for (xipp = sipp + 1; *xipp; xipp++) {
|
||||
if ((*sipp)->subsystem <= (*xipp)->subsystem ||
|
||||
if ((*sipp)->subsystem < (*xipp)->subsystem ||
|
||||
((*sipp)->subsystem == (*xipp)->subsystem &&
|
||||
(*sipp)->order <= (*xipp)->order))
|
||||
continue; /* skip*/
|
||||
|
@ -178,7 +178,7 @@ linker_file_sysuninit(linker_file_t lf)
|
|||
*/
|
||||
for (sipp = (struct sysinit **)sysuninits->ls_items; *sipp; sipp++) {
|
||||
for (xipp = sipp + 1; *xipp; xipp++) {
|
||||
if ((*sipp)->subsystem >= (*xipp)->subsystem ||
|
||||
if ((*sipp)->subsystem > (*xipp)->subsystem ||
|
||||
((*sipp)->subsystem == (*xipp)->subsystem &&
|
||||
(*sipp)->order >= (*xipp)->order))
|
||||
continue; /* skip*/
|
||||
|
|
Loading…
Reference in a new issue