lkml.org 
[lkml]   [2020]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared.
Date
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
\
 
 \ /
  Last update: 2020-12-24 09:03    [W:0.036 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site