From: kernel test robot <lkp@intel.com>
To: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>,
bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
daniel@iogearbox.net, kafai@meta.com, kernel-team@meta.com,
eddyz87@gmail.com, memxor@gmail.com
Cc: oe-kbuild-all@lists.linux.dev, Mykyta Yatsenko <yatsenko@meta.com>
Subject: Re: [PATCH bpf-next v2 3/4] bpf: task work scheduling kfuncs
Date: Sun, 17 Aug 2025 02:14:25 +0800 [thread overview]
Message-ID: <202508170152.F0lX7DFM-lkp@intel.com> (raw)
In-Reply-To: <20250815192156.272445-4-mykyta.yatsenko5@gmail.com>
Hi Mykyta,
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/Mykyta-Yatsenko/bpf-bpf-task-work-plumbing/20250816-032308
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20250815192156.272445-4-mykyta.yatsenko5%40gmail.com
patch subject: [PATCH bpf-next v2 3/4] bpf: task work scheduling kfuncs
config: riscv-randconfig-r122-20250816 (https://download.01.org/0day-ci/archive/20250817/202508170152.F0lX7DFM-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f)
reproduce: (https://download.01.org/0day-ci/archive/20250817/202508170152.F0lX7DFM-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/202508170152.F0lX7DFM-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/bpf/helpers.c:2471:18: sparse: sparse: symbol 'bpf_task_release_dtor' was not declared. Should it be static?
kernel/bpf/helpers.c:2501:18: sparse: sparse: symbol 'bpf_cgroup_release_dtor' was not declared. Should it be static?
kernel/bpf/helpers.c:3367:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3367:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3367:17: sparse: got char *
kernel/bpf/helpers.c:3368:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3368:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3368:17: sparse: got char *
kernel/bpf/helpers.c:3407:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3407:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3407:17: sparse: got char *
kernel/bpf/helpers.c:3461:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3461:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3461:17: sparse: got char *
kernel/bpf/helpers.c:3493:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3493:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3493:17: sparse: got char *
kernel/bpf/helpers.c:3526:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3526:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3526:17: sparse: got char *
kernel/bpf/helpers.c:3576:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3576:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3576:17: sparse: got char *
kernel/bpf/helpers.c:3580:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3580:25: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3580:25: sparse: got char *
kernel/bpf/helpers.c:3620:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3620:17: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3620:17: sparse: got char *
kernel/bpf/helpers.c:3624:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3624:25: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3624:25: sparse: got char *
kernel/bpf/helpers.c:3666:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3666:25: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3666:25: sparse: got char *
kernel/bpf/helpers.c:3669:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got char * @@
kernel/bpf/helpers.c:3669:25: sparse: expected void const [noderef] __user *from
kernel/bpf/helpers.c:3669:25: sparse: got char *
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
>> kernel/bpf/helpers.c:3856:27: sparse: sparse: cast removes address space '__rcu' of expression
kernel/bpf/helpers.c:2965:18: sparse: sparse: context imbalance in 'bpf_rcu_read_lock' - wrong count at exit
kernel/bpf/helpers.c:2970:18: sparse: sparse: context imbalance in 'bpf_rcu_read_unlock' - unexpected unlock
vim +/__rcu +3856 kernel/bpf/helpers.c
3838
3839 static struct bpf_task_work_context *bpf_task_work_context_acquire(struct bpf_task_work *tw,
3840 struct bpf_map *map)
3841 {
3842 struct bpf_task_work_context *ctx, *old_ctx;
3843 enum bpf_task_work_state state;
3844 struct bpf_task_work_context __force __rcu **ppc =
3845 (struct bpf_task_work_context __force __rcu **)&tw->ctx;
3846
3847 /* ctx pointer is RCU protected */
3848 rcu_read_lock_trace();
3849 ctx = rcu_dereference(*ppc);
3850 if (!ctx) {
3851 ctx = bpf_task_work_context_alloc();
3852 if (!ctx) {
3853 rcu_read_unlock_trace();
3854 return ERR_PTR(-ENOMEM);
3855 }
> 3856 old_ctx = unrcu_pointer(cmpxchg(ppc, NULL, RCU_INITIALIZER(ctx)));
3857 /*
3858 * If ctx is set by another CPU, release allocated memory.
3859 * Do not fail, though, attempt stealing the work
3860 */
3861 if (old_ctx) {
3862 bpf_mem_free(&bpf_global_ma, ctx);
3863 ctx = old_ctx;
3864 }
3865 }
3866 state = cmpxchg(&ctx->state, BPF_TW_STANDBY, BPF_TW_PENDING);
3867 /*
3868 * We can unlock RCU, because task work scheduler (this codepath)
3869 * now owns the ctx or returning an error
3870 */
3871 rcu_read_unlock_trace();
3872 if (state != BPF_TW_STANDBY)
3873 return ERR_PTR(-EBUSY);
3874 return ctx;
3875 }
3876
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-08-16 18:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 19:21 [PATCH bpf-next v2 0/4] bpf: Introduce deferred task context execution Mykyta Yatsenko
2025-08-15 19:21 ` [PATCH bpf-next v2 1/4] bpf: bpf task work plumbing Mykyta Yatsenko
2025-08-19 1:34 ` Eduard Zingerman
2025-08-29 15:23 ` Mykyta Yatsenko
2025-08-15 19:21 ` [PATCH bpf-next v2 2/4] bpf: extract map key pointer calculation Mykyta Yatsenko
2025-08-19 11:05 ` Kumar Kartikeya Dwivedi
2025-08-19 20:50 ` Andrii Nakryiko
2025-08-15 19:21 ` [PATCH bpf-next v2 3/4] bpf: task work scheduling kfuncs Mykyta Yatsenko
2025-08-15 22:00 ` Jiri Olsa
2025-08-18 13:36 ` Mykyta Yatsenko
2025-08-16 18:14 ` kernel test robot [this message]
2025-08-19 14:18 ` Kumar Kartikeya Dwivedi
2025-08-19 18:13 ` Mykyta Yatsenko
2025-08-19 19:27 ` Kumar Kartikeya Dwivedi
2025-08-19 20:49 ` Andrii Nakryiko
2025-08-20 16:11 ` Kumar Kartikeya Dwivedi
2025-08-20 18:33 ` Andrii Nakryiko
2025-08-28 1:34 ` Alexei Starovoitov
2025-08-28 17:00 ` Andrii Nakryiko
2025-08-28 17:38 ` Kumar Kartikeya Dwivedi
2025-08-27 21:03 ` Andrii Nakryiko
2025-08-28 22:29 ` Kumar Kartikeya Dwivedi
2025-08-15 19:21 ` [PATCH bpf-next v2 4/4] selftests/bpf: BPF task work scheduling tests Mykyta Yatsenko
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=202508170152.F0lX7DFM-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=eddyz87@gmail.com \
--cc=kafai@meta.com \
--cc=kernel-team@meta.com \
--cc=memxor@gmail.com \
--cc=mykyta.yatsenko5@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yatsenko@meta.com \
/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 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.