libkmod-module: probe: fix infinite loop with softdeps
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 11 Feb 2012 21:45:29 +0000 (19:45 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Sat, 11 Feb 2012 21:50:00 +0000 (19:50 -0200)
commit8cd0f9e4f9f5c093136a7a2c0c2998b9dd203161
tree42a20b1bf2dd1d14a47f23ef717518bd01ec703b
parentabb7e4706d4e3e5c1cc378cd57dd66d70f626e2a
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