* [PATCH bpf-next] bpf: Make symbol 'bpf_task_storage_busy' static
@ 2021-03-11 13:15 'Wei Yongjun
2021-03-12 1:27 ` Song Liu
0 siblings, 1 reply; 2+ messages in thread
From: 'Wei Yongjun @ 2021-03-11 13:15 UTC (permalink / raw)
To: weiyongjun1, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Christian Brauner, Song Liu
Cc: netdev, bpf, kernel-janitors, Hulk Robot
From: Wei Yongjun <weiyongjun1@huawei.com>
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>
---
kernel/bpf/bpf_task_storage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf: Make symbol 'bpf_task_storage_busy' static
2021-03-11 13:15 [PATCH bpf-next] bpf: Make symbol 'bpf_task_storage_busy' static 'Wei Yongjun
@ 2021-03-12 1:27 ` Song Liu
0 siblings, 0 replies; 2+ messages in thread
From: Song Liu @ 2021-03-12 1:27 UTC (permalink / raw)
To: 'Wei Yongjun
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Christian Brauner, Networking, bpf, kernel-janitors, Hulk Robot
> On Mar 11, 2021, at 5:15 AM, 'Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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>
Acked-by: Song Liu <songliubraving@fb.com>
Thanks for the fix!
> ---
> kernel/bpf/bpf_task_storage.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)
> {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-12 1:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 13:15 [PATCH bpf-next] bpf: Make symbol 'bpf_task_storage_busy' static 'Wei Yongjun
2021-03-12 1:27 ` Song Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.