Skip to content

Commit

Permalink
Merge pull request #2239 from katiewasnothere/kabaldau/check_exist_mo…
Browse files Browse the repository at this point in the history
…dules_dir

Remove kernel panic when kmod load fails
  • Loading branch information
katiewasnothere authored Aug 20, 2024
2 parents 0084749 + 327e535 commit 4f3da95
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions init/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,7 @@ void load_all_modules() {

kmod_load_resources(k_ctx);
ret = ftw(modules_dir, parse_tree_entry, OPEN_FDS);
if (ret < 0) {
kmod_unref(k_ctx);
die("failed to load kmod resources");
} else if (ret != 0) {
if (ret != 0) {
// Don't fail on error from walking the file tree and loading modules right now.
// ftw may return an error if the modules directory doesn't exist, which
// may be the case for some images. Additionally, we don't currently support
Expand Down

0 comments on commit 4f3da95

Please sign in to comment.