netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared.
@ 2020-12-24  8:00 YANG LI
  0 siblings, 0 replies; only message in thread
From: YANG LI @ 2020-12-24  8:00 UTC (permalink / raw)
  To: ast
  Cc: daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, davem, kuba, hawk, natechancellor, ndesaulniers, netdev,
	bpf, linux-kernel, clang-built-linux, YANG LI

Symbol 'btf_vmlinux' was not declared in the header file and does not 
add extern, so no other file uses it. It's better to add static to it.

Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci <abaci@linux.alibaba.com>
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 17270b8..535d364 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -244,7 +244,7 @@ struct bpf_call_arg_meta {
 	u32 ret_btf_id;
 };
 
-struct btf *btf_vmlinux;
+static struct btf *btf_vmlinux;
 
 static DEFINE_MUTEX(bpf_verifier_lock);
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-24  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24  8:00 [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared YANG LI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).