Re: kmod 3 - endless loop in __kmod_module_get_probe_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mantas

On Sat, Feb 11, 2012 at 6:54 PM, Mantas M. <grawity@xxxxxxxxx> wrote:
> Aaaaand it's back.
>
> On 2012-01-10 00:15, Mantas M. wrote:
>> I have a /etc/modprobe.d/virtualbox.conf with the following contents:
>>
>> | softdep vboxdrv post: vboxnetflt vboxnetadp
>>
>> With module-init-tools, this would cause 'vboxnetflt' and 'vboxnetadp'
>> to be loaded automatically after 'vboxdrv'. With kmod 3-5 (Arch Linux
>> [testing]), `modprobe vboxdrv` appears to go into an infinite loop and
>> soon segfaults.
>
> With kmod 5-2 (Arch Linux [testing]), the same `modprobe vboxdrv` with
> the same "virtualbox.conf" goes to *another* infinite loop and segfaults.
>

argghh :-/


> Except this time the backtrace is different:
>
> | #88 0x00007fe08888c343 in __kmod_module_fill_softdep (mod=0x24f02b0,
> |     list=0x7fffc1c3b1a8) at libkmod/libkmod-module.c:1021
> | #89 0x00007fe08888c41f in __kmod_module_get_probe_list (mod=0x24f0440,
> |     ignorecmd=false, list=0x7fffc1c3b1a8) at libkmod/libkmod-module.c:1050
> | #90 0x00007fe08888c343 in __kmod_module_fill_softdep (mod=0x24f02b0,
> |     list=0x7fffc1c3b1a8) at libkmod/libkmod-module.c:1021
> | #91 0x00007fe08888c41f in __kmod_module_get_probe_list (mod=0x24f0440,
> |     ignorecmd=false, list=0x7fffc1c3b1a8) at libkmod/libkmod-module.c:1050


Does the attached diff fix the issue for you? I'm travelling these
days (on my way to ELC) so if this fixes the issue, Falconindy might
want to apply this patch until I have time to properly commit it.


Thanks for reporting this. Now we have a testsuite in place so this
regression doesn't come back every now and then.


Lucas De Marchi
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) {

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux