genetlink: Call genl_init() later when CONFIG_INITCALL_ASYNC=y

genl_init() depends on netlink_proto_init() to init nl_table.
But genl_init() and netlink_proto_init() are both in the same
core_initcall level.

Fix this by moving genl_init() to the core_initcall_sync level,
which is earlier than thermal_init().

Change-Id: Id4c85ea069c6ce3ebcb632856b695018bcc1e981
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2025-04-01 16:46:02 +08:00
parent a7f5880658
commit 5eb9313c16

View File

@@ -1494,7 +1494,11 @@ problem:
panic("GENL: Cannot register controller: %d\n", err);
}
#ifdef CONFIG_INITCALL_ASYNC
core_initcall_sync(genl_init);
#else
core_initcall(genl_init);
#endif
static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group)
{