Skip to content

Commit ebcb6a0

Browse files
xry111Kernel Patches Daemon
authored and
Kernel Patches Daemon
committed
bpf: Fix BPF_INTERNAL namespace import
The commit cdd30eb ("module: Convert symbol namespace to string literal") makes the grammar of MODULE_IMPORT_NS and EXPORT_SYMBOL_NS different between the stable branches and the mainline. But when the commit 955f9ede52b8 ("bpf: Add namespace to BPF internal symbols") was backported from mainline, only EXPORT_SYMBOL_NS instances are adapted, leaving the MODULE_IMPORT_NS instance with the "new" grammar and causing the module fails to build: ERROR: modpost: module bpf_preload uses symbol bpf_link_get_from_fd from namespace BPF_INTERNAL, but does not import it. ERROR: modpost: module bpf_preload uses symbol kern_sys_bpf from namespace BPF_INTERNAL, but does not import it. Reported-by: Mingcong Bai <[email protected]> Reported-by: Alex Davis <[email protected]> Closes: https://lore.kernel.org/all/CADiockBKBQTVqjA5G+RJ9LBwnEnZ8o0odYnL=LBZ_7QN=_SZ7A@mail.gmail.com/ Fixes: 955f9ede52b8 ("bpf: Add namespace to BPF internal symbols") Signed-off-by: Xi Ruoyao <[email protected]>
1 parent 6bce87f commit ebcb6a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/preload/bpf_preload_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ static void __exit fini(void)
8989
}
9090
late_initcall(load);
9191
module_exit(fini);
92-
MODULE_IMPORT_NS("BPF_INTERNAL");
92+
MODULE_IMPORT_NS(BPF_INTERNAL);
9393
MODULE_LICENSE("GPL");
9494
MODULE_DESCRIPTION("Embedded BPF programs for introspection in bpffs");

0 commit comments

Comments
 (0)