diff options
author | root <root@rshg054.dnsready.net> | 2012-02-14 23:14:55 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-14 23:14:55 +0000 |
commit | 812b715ebd89fb9049df7000c721990084b525c6 (patch) | |
tree | 28d43e6e6913a90b83f44660108e44f7353d8c82 /testing/kmod | |
parent | 16e845de1bbf76ab48a02bfaa21730f45e6afaaa (diff) |
Tue Feb 14 23:14:55 UTC 2012
Diffstat (limited to 'testing/kmod')
-rw-r--r-- | testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch | 39 | ||||
-rw-r--r-- | testing/kmod/PKGBUILD | 11 |
2 files changed, 47 insertions, 3 deletions
diff --git a/testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch b/testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch new file mode 100644 index 000000000..95e7f859a --- /dev/null +++ b/testing/kmod/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch @@ -0,0 +1,39 @@ +From 8cd0f9e4f9f5c093136a7a2c0c2998b9dd203161 Mon Sep 17 00:00:00 2001 +From: Lucas De Marchi <lucas.demarchi@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 + diff --git a/testing/kmod/PKGBUILD b/testing/kmod/PKGBUILD index 678db471d..64017dd1a 100644 --- a/testing/kmod/PKGBUILD +++ b/testing/kmod/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 149778 2012-02-10 19:09:35Z dreisner $ +# $Id: PKGBUILD 150158 2012-02-13 18:05:27Z dreisner $ # Maintainer: Dave Reisner <dreisner@archlinux.org> 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 @@ conflicts=('module-init-tools') 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,7 +28,10 @@ build() { # fix modprobe --show-depends failures on loaded modules patch -Np1 <"$srcdir/0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch" - CFLAGS+=' -g -O0' ./configure \ + # fix infinite loop with softdeps + patch -Np1 <"$srcdir/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch" + + ./configure \ --sysconfdir=/etc \ --with-rootprefix= \ --with-zlib |