]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod-module: don't treat "coming" as in-kernel
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 23 Feb 2012 18:37:13 +0000 (16:37 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 23 Feb 2012 18:47:33 +0000 (16:47 -0200)
commit7cd664fbaead46b5f5ea4812cf9a7cbe6264eb7d
treea84ef2c68c9ca0625cec4174d2cec729dc9c83ce
parent80e54cb675d08f4f81b093a1919465ea86110a3b
libkmod-module: don't treat "coming" as in-kernel

Running two instances of modprobe with the same module should both
succeed or both fail:

modprobe foo&; modprobe foo;

Previously if foo failed to be inserted by the first call, the second one
could return 0 because it may have occurred while the first one was being
processed by kernel (thus marked as "coming").

Now we simply don't check by "coming" in order to decide if we need to
call init_module(). module-init-tools used to spin calling
usleep(100000), but calls to init_module() are already synchronous.
Therefore let kernel synchronize the calls.
libkmod/libkmod-module.c