|
|
1bf31c |
From cfa57e264efa138e99257fbfbe18449150a96c4d Mon Sep 17 00:00:00 2001
|
|
|
1bf31c |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
|
1bf31c |
Date: Thu, 14 Feb 2019 20:18:04 +0100
|
|
|
1bf31c |
Subject: [PATCH] install: string_hash_func should not be fed with NULL
|
|
|
1bf31c |
|
|
|
1bf31c |
If kmod_module_get_path returns NULL, we should skip that entry,
|
|
|
1bf31c |
the hash function does not like NULL pointers.
|
|
|
1bf31c |
|
|
|
1bf31c |
(cherry picked from commit fc141f22869bad2e5409d1cc555c1a42ea738343)
|
|
|
1bf31c |
|
|
|
1bf31c |
Resolves: #1868525
|
|
|
1bf31c |
---
|
|
|
1bf31c |
install/dracut-install.c | 5 ++++-
|
|
|
1bf31c |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
1bf31c |
|
|
|
1bf31c |
diff --git a/install/dracut-install.c b/install/dracut-install.c
|
|
|
1bf31c |
index 51f79422..f8ec9a59 100644
|
|
|
1bf31c |
--- a/install/dracut-install.c
|
|
|
1bf31c |
+++ b/install/dracut-install.c
|
|
|
1bf31c |
@@ -1248,6 +1248,9 @@ static int install_dependent_modules(struct kmod_list *modlist)
|
|
|
1bf31c |
mod = kmod_module_get_module(itr);
|
|
|
1bf31c |
path = kmod_module_get_path(mod);
|
|
|
1bf31c |
|
|
|
1bf31c |
+ if (path == NULL)
|
|
|
1bf31c |
+ continue;
|
|
|
1bf31c |
+
|
|
|
1bf31c |
if (check_hashmap(items_failed, path))
|
|
|
1bf31c |
return -1;
|
|
|
1bf31c |
|
|
|
1bf31c |
@@ -1257,7 +1260,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
|
|
|
1bf31c |
|
|
|
1bf31c |
name = kmod_module_get_name(mod);
|
|
|
1bf31c |
|
|
|
1bf31c |
- if ((path == NULL) || (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0))) {
|
|
|
1bf31c |
+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) {
|
|
|
1bf31c |
continue;
|
|
|
1bf31c |
}
|
|
|
1bf31c |
|
|
|
1bf31c |
|