bpf: netdev: init the offload table earlier
authorJakub Kicinski <kuba@kernel.org>
Fri, 5 May 2023 21:58:36 +0000 (14:58 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 May 2023 14:07:41 +0000 (07:07 -0700)
Some netdevices may get unregistered before late_initcall(),
we have to move the hashtable init earlier.

Fixes: f1fc43d03946 ("bpf: Move offload initialization into late_initcall")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217399
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20230505215836.491485-1-kuba@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/offload.c

index d9c9f45e3529c1b2f6a7965ab2f8ef4135c12dc9..8a26cd8814c1b65cd84895cf3ca759c52e46097c 100644 (file)
@@ -859,4 +859,4 @@ static int __init bpf_offload_init(void)
        return rhashtable_init(&offdevs, &offdevs_params);
 }
 
-late_initcall(bpf_offload_init);
+core_initcall(bpf_offload_init);