From: kernel test robot <lkp@intel.com>
To: Yonghong Song <yonghong.song@linux.dev>, bpf@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
kernel-team@fb.com, Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH bpf-next v3 2/6] bpf: Allow per unit prefill for non-fix-size percpu memory allocator
Date: Sat, 16 Dec 2023 23:27:19 +0800 [thread overview]
Message-ID: <202312162351.UuoFmjJk-lkp@intel.com> (raw)
In-Reply-To: <20231216023015.3741144-1-yonghong.song@linux.dev>
Hi Yonghong,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Yonghong-Song/bpf-Avoid-unnecessary-extra-percpu-memory-allocation/20231216-103310
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20231216023015.3741144-1-yonghong.song%40linux.dev
patch subject: [PATCH bpf-next v3 2/6] bpf: Allow per unit prefill for non-fix-size percpu memory allocator
config: x86_64-randconfig-003-20231216 (https://download.01.org/0day-ci/archive/20231216/202312162351.UuoFmjJk-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231216/202312162351.UuoFmjJk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312162351.UuoFmjJk-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/bpf/memalloc.c:665:14: warning: variable 'objcg' is uninitialized when used here [-Wuninitialized]
c->objcg = objcg;
^~~~~
kernel/bpf/memalloc.c:642:26: note: initialize the variable 'objcg' to silence this warning
struct obj_cgroup *objcg;
^
= NULL
1 warning generated.
vim +/objcg +665 kernel/bpf/memalloc.c
637
638 int bpf_mem_alloc_percpu_unit_init(struct bpf_mem_alloc *ma, int size)
639 {
640 int cpu, i, err = 0, unit_size, percpu_size;
641 struct bpf_mem_caches *cc, __percpu *pcc;
642 struct obj_cgroup *objcg;
643 struct bpf_mem_cache *c;
644
645 i = bpf_mem_cache_idx(size);
646 if (i < 0)
647 return -EINVAL;
648
649 /* room for llist_node and per-cpu pointer */
650 percpu_size = LLIST_NODE_SZ + sizeof(void *);
651
652 pcc = ma->caches;
653 unit_size = sizes[i];
654
655 #ifdef CONFIG_MEMCG_KMEM
656 objcg = get_obj_cgroup_from_current();
657 #endif
658 for_each_possible_cpu(cpu) {
659 cc = per_cpu_ptr(pcc, cpu);
660 c = &cc->cache[i];
661 if (cpu == 0 && c->unit_size)
662 goto out;
663
664 c->unit_size = unit_size;
> 665 c->objcg = objcg;
666 c->percpu_size = percpu_size;
667 c->tgt = c;
668
669 init_refill_work(c);
670 prefill_mem_cache(c, cpu);
671
672 if (cpu == 0) {
673 err = check_obj_size(c, i);
674 if (err) {
675 drain_mem_cache(c);
676 memset(c, 0, sizeof(*c));
677 goto out;
678 }
679 }
680 }
681
682 out:
683 return err;
684 }
685
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2023-12-16 15:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20231216023015.3741144-1-yonghong.song@linux.dev>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202312162351.UuoFmjJk-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=llvm@lists.linux.dev \
--cc=martin.lau@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox