kernel/module: Panic if search_module is called during gKernelStartup.
The VFS has not been initialized at this point, so we can't use it. Should catch #15865.
This commit is contained in:
@@ -624,6 +624,11 @@ search_module(const char* name, module_image** _moduleImage)
|
|||||||
|
|
||||||
TRACE(("search_module(%s)\n", name));
|
TRACE(("search_module(%s)\n", name));
|
||||||
|
|
||||||
|
if (gKernelStartup) {
|
||||||
|
panic("search_module called during kernel startup! name: \"%s\"", name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = kNumModulePaths; i-- > 0;) {
|
for (i = kNumModulePaths; i-- > 0;) {
|
||||||
if (sDisableUserAddOns && i >= kFirstNonSystemModulePath)
|
if (sDisableUserAddOns && i >= kFirstNonSystemModulePath)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user