From patchwork Thu Mar 11 13:15:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 12131199 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F42CC433E6 for ; Thu, 11 Mar 2021 13:07:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCF6A64E3F for ; Thu, 11 Mar 2021 13:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233340AbhCKNGv (ORCPT ); Thu, 11 Mar 2021 08:06:51 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:13908 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233252AbhCKNGi (ORCPT ); Thu, 11 Mar 2021 08:06:38 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4Dx8LP3y2PzkXdy; Thu, 11 Mar 2021 21:05:01 +0800 (CST) Received: from localhost.localdomain (10.175.102.38) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Thu, 11 Mar 2021 21:06:20 +0800 From: 'Wei Yongjun To: , Alexei Starovoitov , "Daniel Borkmann" , Andrii Nakryiko , Christian Brauner , Song Liu CC: , , , Hulk Robot Subject: [PATCH bpf-next] bpf: Make symbol 'bpf_task_storage_busy' static Date: Thu, 11 Mar 2021 13:15:05 +0000 Message-ID: <20210311131505.1901509-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.102.38] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net From: Wei Yongjun 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 Signed-off-by: Wei Yongjun Acked-by: Song Liu --- 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) {