[PATCH] kmodloader: fix out-of-order module loading
Christian Lamparter
chunkeey at googlemail.com
Sat Jan 28 15:43:56 PST 2017
Currently, kmodloader is trying to load all modules during
boot. This is because all the modules (and not just those
which start with a number) are set to probe.
Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
The load_modprobe() seems to be necessary, since I've also hit
a hang with 4.9 caused by nf_nat_ipv6.ko. This is because it
calls request_module for nf_conntrack_ipv6. So the order in
the /etc/modprobe.d/ files is still important.
I have the following options enabled:
CONFIG_PACKAGE_kmod-ip6tables-extra=y
CONFIG_PACKAGE_kmod-ipt-conntrack-extra=y
CONFIG_PACKAGE_kmod-ipt-ipsec=y
CONFIG_PACKAGE_kmod-ipt-nat-extra=y
CONFIG_PACKAGE_kmod-ipt-nat6=y
I fixed this by adding nf_conntrack_ipv6 to NF_CONNTRACK6
in modules/netfilter.mk. No idea if this is also a problem
on 4.4 or not.
---
kmodloader.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kmodloader.c b/kmodloader.c
index 729027a..bf8c36c 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -933,10 +933,11 @@ static int main_loader(int argc, char **argv)
if (opts)
m->opts = strdup(opts);
- m->state = PROBE;
- if (basename(gl.gl_pathv[j])[0] - '0' <= 9)
- load_modprobe();
+ if (basename(gl.gl_pathv[j])[0] - '0' <= 9) {
+ m->state = PROBE;
+ load_modprobe();
+ }
}
free(mod);
fclose(fp);
--
2.11.0
More information about the Lede-dev
mailing list