mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 09:43:47 +00:00
In linker_load_module(), check that rootdev != NODEV before calling
linker_search_module(). Without this, modules loaded from loader.conf that then try to load in additional modules (such as digi.ko loading a card's BIOS) die badly in the vn_open() called from linker_search_module(). It may be worth checking (KASSERTing?) that rootdev != NODEV in vn_open() too.
This commit is contained in:
parent
96987c74d6
commit
f1e4a6e941
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94322
|
@ -1619,14 +1619,16 @@ linker_load_module(const char *kldname, const char *modname,
|
|||
} else {
|
||||
if (modlist_lookup2(modname, verinfo) != NULL)
|
||||
return (EEXIST);
|
||||
if (kldname == NULL)
|
||||
if (kldname != NULL)
|
||||
pathname = linker_strdup(kldname);
|
||||
else if (rootdev == NODEV)
|
||||
pathname = NULL;
|
||||
else
|
||||
/*
|
||||
* Need to find a KLD with required module
|
||||
*/
|
||||
pathname = linker_search_module(modname,
|
||||
strlen(modname), verinfo);
|
||||
else
|
||||
pathname = linker_strdup(kldname);
|
||||
}
|
||||
if (pathname == NULL)
|
||||
return (ENOENT);
|
||||
|
|
Loading…
Reference in a new issue