Harald Hoyer ff2fda
From e331e06a3910ef3fe6837f3e93a48123a7cc822b Mon Sep 17 00:00:00 2001
Harald Hoyer ff2fda
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer ff2fda
Date: Wed, 18 Jul 2018 12:41:01 +0200
Harald Hoyer ff2fda
Subject: [PATCH] dracut-install: skip modules with empty path
Harald Hoyer ff2fda
Harald Hoyer ff2fda
if kmod_module_get_path(module) returns NULL, skip the module
Harald Hoyer ff2fda
---
Harald Hoyer ff2fda
 install/dracut-install.c | 2 +-
Harald Hoyer ff2fda
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer ff2fda
Harald Hoyer ff2fda
diff --git a/install/dracut-install.c b/install/dracut-install.c
Harald Hoyer ff2fda
index 001225b4..88bca1d4 100644
Harald Hoyer ff2fda
--- a/install/dracut-install.c
Harald Hoyer ff2fda
+++ b/install/dracut-install.c
Harald Hoyer ff2fda
@@ -1244,7 +1244,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
Harald Hoyer ff2fda
                 path = kmod_module_get_path(mod);
Harald Hoyer ff2fda
 
Harald Hoyer ff2fda
                 name = kmod_module_get_name(mod);
Harald Hoyer ff2fda
-                if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
Harald Hoyer ff2fda
+                if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) {
Harald Hoyer ff2fda
                         kmod_module_unref(mod);
Harald Hoyer ff2fda
                         continue;
Harald Hoyer ff2fda
                 }
Harald Hoyer f97365