Annotation of /trunk/kmod/patches/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch
Parent Directory | Revision Log
Revision 1651 -
(hide annotations)
(download)
Sat Feb 18 03:37:31 2012 UTC (12 years, 7 months ago) by niro
File size: 1284 byte(s)
Sat Feb 18 03:37:31 2012 UTC (12 years, 7 months ago) by niro
File size: 1284 byte(s)
-added upstream patches
1 | niro | 1651 | From 8cd0f9e4f9f5c093136a7a2c0c2998b9dd203161 Mon Sep 17 00:00:00 2001 |
2 | From: Lucas De Marchi <lucas.demarchi@profusion.mobi> | ||
3 | Date: Sat, 11 Feb 2012 19:45:29 -0200 | ||
4 | Subject: [PATCH] libkmod-module: probe: fix infinite loop with softdeps | ||
5 | |||
6 | If a softdep depends on a module in the dependency list of the module | ||
7 | being inserted, we would enter and infinite loop. | ||
8 | |||
9 | Move the "mod->visited = true" assignment to the proper place, hoping it | ||
10 | didn't break other use cases. This is a bug that comes and goes every | ||
11 | now and then. Since we have a testsuite now, a test for this should be | ||
12 | written. | ||
13 | --- | ||
14 | libkmod/libkmod-module.c | 2 +- | ||
15 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
16 | |||
17 | diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c | ||
18 | index b5eb7c9..835896f 100644 | ||
19 | --- a/libkmod/libkmod-module.c | ||
20 | +++ b/libkmod/libkmod-module.c | ||
21 | @@ -1013,7 +1013,6 @@ static int __kmod_module_fill_softdep(struct kmod_module *mod, | ||
22 | goto fail; | ||
23 | } | ||
24 | *list = l; | ||
25 | - mod->visited = true; | ||
26 | mod->ignorecmd = (pre != NULL || post != NULL); | ||
27 | |||
28 | kmod_list_foreach(l, post) { | ||
29 | @@ -1043,6 +1042,7 @@ static int __kmod_module_get_probe_list(struct kmod_module *mod, | ||
30 | mod->name); | ||
31 | return 0; | ||
32 | } | ||
33 | + mod->visited = true; | ||
34 | |||
35 | dep = kmod_module_get_dependencies(mod); | ||
36 | kmod_list_foreach(l, dep) { | ||
37 | -- | ||
38 | 1.7.9 | ||
39 |