From 194de7601da83b50f04095735d92cc572500a4e1 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 29 Apr 2019 21:28:46 +0200 Subject: [PATCH] dracut: add patch to fix a potential segfault Without this patches dracut may segfault on certain platforms with certain kernel configurations. In this case, it segfaults on ppc64 big endian. Bump rev because it may happen anywhere. Closes: #11384 [via git-merge-pr] --- .../dracut/patches/fix-dracut-install-segv.patch | 16 ++++++++++++++++ srcpkgs/dracut/template | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dracut/patches/fix-dracut-install-segv.patch diff --git a/srcpkgs/dracut/patches/fix-dracut-install-segv.patch b/srcpkgs/dracut/patches/fix-dracut-install-segv.patch new file mode 100644 index 00000000000..c74ecd8f700 --- /dev/null +++ b/srcpkgs/dracut/patches/fix-dracut-install-segv.patch @@ -0,0 +1,16 @@ +This fixes a segfault, see https://github.com/dracutdevs/dracut/pull/541 + +Remove after update to 050. + +--- install/dracut-install.c ++++ install/dracut-install.c +@@ -1243,6 +1243,9 @@ static int install_dependent_modules(struct kmod_list *modlist) + mod = kmod_module_get_module(itr); + path = kmod_module_get_path(mod); + ++ if (path == NULL) ++ continue; ++ + name = kmod_module_get_name(mod); + if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) { + kmod_module_unref(mod); diff --git a/srcpkgs/dracut/template b/srcpkgs/dracut/template index 4c6969b0cfb..523db603299 100644 --- a/srcpkgs/dracut/template +++ b/srcpkgs/dracut/template @@ -1,7 +1,7 @@ # Template file for 'dracut' pkgname=dracut version=048 -revision=4 +revision=5 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc" conf_files="/etc/dracut.conf"