summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2021-03-11 13:15:05 +0000
committerAlexei Starovoitov <ast@kernel.org>2021-03-16 12:24:20 -0700
commit4d0b93896ff8d6795ad8d1b604e41aa850d5a635 (patch)
treec503ffa25f07113e1d2952771418f6dcbb20b23b /kernel/bpf
parent6bd45f2e78f31bde335f7720e570a07331031110 (diff)
bpf: Make symbol 'bpf_task_storage_busy' static
The sparse tool complains as follows: kernel/bpf/bpf_task_storage.c:23:1: warning: symbol '__pcpu_scope_bpf_task_storage_busy' was not declared. Should it be static? This symbol is not used outside of bpf_task_storage.c, so this commit marks it static. Fixes: bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20210311131505.1901509-1-weiyongjun1@huawei.com
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/bpf_task_storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/bpf_task_storage.c b/kernel/bpf/bpf_task_storage.c
index fd3c74ef608e..3ce75758d394 100644
--- a/kernel/bpf/bpf_task_storage.c
+++ b/kernel/bpf/bpf_task_storage.c
@@ -20,7 +20,7 @@
DEFINE_BPF_STORAGE_CACHE(task_cache);
-DEFINE_PER_CPU(int, bpf_task_storage_busy);
+static DEFINE_PER_CPU(int, bpf_task_storage_busy);
static void bpf_task_storage_lock(void)
{