diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -461,8 +461,11 @@ * If we got something other than ENOENT, then it exists but * we cannot load it for some other reason. */ - if (error != ENOENT) + if (error != ENOENT) { foundfile = 1; + if (error == EEXIST) + break; + } if (lf) { error = linker_file_register_modules(lf); if (error == EEXIST) {