diff --git a/0001-libkmod-module-don-t-treat-coming-as-in-kernel.patch b/0001-libkmod-module-don-t-treat-coming-as-in-kernel.patch new file mode 100644 index 0000000..7a8fff8 --- /dev/null +++ b/0001-libkmod-module-don-t-treat-coming-as-in-kernel.patch @@ -0,0 +1,37 @@ +From 7cd664fbaead46b5f5ea4812cf9a7cbe6264eb7d Mon Sep 17 00:00:00 2001 +From: Lucas De Marchi +Date: Thu, 23 Feb 2012 16:37:13 -0200 +Subject: [PATCH] libkmod-module: don't treat "coming" as in-kernel + +Running two instances of modprobe with the same module should both +succeed or both fail: + +modprobe foo&; modprobe foo; + +Previously if foo failed to be inserted by the first call, the second one +could return 0 because it may have occurred while the first one was being +processed by kernel (thus marked as "coming"). + +Now we simply don't check by "coming" in order to decide if we need to +call init_module(). module-init-tools used to spin calling +usleep(100000), but calls to init_module() are already synchronous. +Therefore let kernel synchronize the calls. +--- + libkmod/libkmod-module.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c +index 69f1265..de25281 100644 +--- a/libkmod/libkmod-module.c ++++ b/libkmod/libkmod-module.c +@@ -110,7 +110,6 @@ static inline bool module_is_inkernel(struct kmod_module *mod) + { + int state = kmod_module_get_initstate(mod); + if (state == KMOD_MODULE_LIVE || +- state == KMOD_MODULE_COMING || + state == KMOD_MODULE_BUILTIN) + return true; + else +-- +1.7.9 + diff --git a/kmod.spec b/kmod.spec index 6e839d0..7cee733 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 5 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Linux kernel module management utilities Group: System Environment/Kernel @@ -22,6 +22,7 @@ Obsoletes: module-init-tools < 4.0-1 Provides: /sbin/modprobe Patch1: 0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch Patch2: 0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch +Patch3: 0001-libkmod-module-don-t-treat-coming-as-in-kernel.patch %description The kmod package provides various programs needed for automatic @@ -51,6 +52,7 @@ applications that wish to load or unload Linux kernel modules. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build export V=1 @@ -104,6 +106,9 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d %{_libdir}/libkmod.so %changelog +* Fri Feb 24 2012 Kay Sievers - 5-8 +- try to address brc#771285 + * Sun Feb 12 2012 Kay Sievers - 5-7 - fix infinite loop with softdeps