If modules contain circular dependencies, the depmod script will follow
the circle forever. So add a simple sanity check to abort rather than
chew up the CPU.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
$depth .= " ";
warn "${depth}loading deps of module: $this_module\n" if $verbose;
+ if (length($depth) > 50) {
+ die "too much recursion (circular dependencies in modules?)";
+ }
foreach my $md (keys %{$mod->{$this_module}}) {
add_mod_deps ($depth, $mod, $mod2, $module, $md);