[arch-commits] Commit in kmod/trunk (2 files)
Dave Reisner
dreisner at archlinux.org
Mon Feb 13 18:05:11 UTC 2012
Date: Monday, February 13, 2012 @ 13:05:11
Author: dreisner
Revision: 150157
upgpkg: kmod 5-3
- Backport upstream patch to fix infinite loop in softdeps
Added:
kmod/trunk/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch
Modified:
kmod/trunk/PKGBUILD
-----------------------------------------------------------------+
0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch | 39 ++++++++++
PKGBUILD | 7 +
2 files changed, 45 insertions(+), 1 deletion(-)
Added: 0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch
===================================================================
--- 0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch (rev 0)
+++ 0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch 2012-02-13 18:05:11 UTC (rev 150157)
@@ -0,0 +1,39 @@
+From 8cd0f9e4f9f5c093136a7a2c0c2998b9dd203161 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+Date: Sat, 11 Feb 2012 19:45:29 -0200
+Subject: [PATCH] libkmod-module: probe: fix infinite loop with softdeps
+
+If a softdep depends on a module in the dependency list of the module
+being inserted, we would enter and infinite loop.
+
+Move the "mod->visited = true" assignment to the proper place, hoping it
+didn't break other use cases. This is a bug that comes and goes every
+now and then. Since we have a testsuite now, a test for this should be
+written.
+---
+ libkmod/libkmod-module.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
+index b5eb7c9..835896f 100644
+--- a/libkmod/libkmod-module.c
++++ b/libkmod/libkmod-module.c
+@@ -1013,7 +1013,6 @@ static int __kmod_module_fill_softdep(struct kmod_module *mod,
+ goto fail;
+ }
+ *list = l;
+- mod->visited = true;
+ mod->ignorecmd = (pre != NULL || post != NULL);
+
+ kmod_list_foreach(l, post) {
+@@ -1043,6 +1042,7 @@ static int __kmod_module_get_probe_list(struct kmod_module *mod,
+ mod->name);
+ return 0;
+ }
++ mod->visited = true;
+
+ dep = kmod_module_get_dependencies(mod);
+ kmod_list_foreach(l, dep) {
+--
+1.7.9
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-02-13 17:15:18 UTC (rev 150156)
+++ PKGBUILD 2012-02-13 18:05:11 UTC (rev 150157)
@@ -3,7 +3,7 @@
pkgname=kmod
pkgver=5
-pkgrel=2
+pkgrel=3
pkgdesc="Linux kernel module handling"
arch=('i686' 'x86_64')
url="http://git.profusion.mobi/cgit.cgi/kmod.git"
@@ -15,9 +15,11 @@
replaces=('module-init-tools')
source=("http://packages.profusion.mobi/$pkgname/$pkgname-$pkgver.tar.xz"
'0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch'
+ '0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch'
"depmod-search.conf")
md5sums=('b271c2ec54aba1c67bda63c8579d8c15'
'81545a1509b43008f85c03fb980f0e86'
+ '662a85dbe420f04c1ef24f9cd4e4c990'
'4b8cbcbc54b9029c99fd730e257d4436')
build() {
@@ -26,6 +28,9 @@
# fix modprobe --show-depends failures on loaded modules
patch -Np1 <"$srcdir/0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch"
+ # fix infinite loop with softdeps
+ patch -Np1 <"$srcdir/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch"
+
./configure \
--sysconfdir=/etc \
--with-rootprefix= \
More information about the arch-commits
mailing list