From a0f44c9df33d90d0820242ca34062410e40f2ed2 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Sat, 4 Apr 2020 15:55:57 +0800 Subject: [PATCH] netfilter: x_tables: Call xt_init() early when CONFIG_INITCALL_ASYNC=y classify_tg_init() depends on xt_init() to init xt. But classify_tg_init() and xt_init() are both in the same module_init level. Fix this by moving xt_init() to the rootfs_initcall level. Change-Id: If9aaae57704e064b719731efa3112d4e652f0069 Signed-off-by: Tao Huang --- net/netfilter/x_tables.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index e8cc8eef0ab6..b2f111832899 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -2012,6 +2012,10 @@ static void __exit xt_fini(void) kfree(xt); } +#ifdef CONFIG_INITCALL_ASYNC +rootfs_initcall(xt_init); +#else module_init(xt_init); +#endif module_exit(xt_fini);