Re: [PATCH bpf-next v4 02/17] mm, bpf: introduce BPF OOM struct ops
From: kernel test robot
Date: Thu Dec 03 2026 - 00:41:00 EST
Hi Ben,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master linus/master v7.4-rc5 next-20261202]
[cannot apply to akpm-mm/mm-everything bpf-next/net]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ben-Gardon/bpf-mark-struct-oom_control-s-memcg-field-as-TRUSTED_OR_NULL/20261202-130351
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20261202210415.517651-3-bgardon%40google.com
patch subject: [PATCH bpf-next v4 02/17] mm, bpf: introduce BPF OOM struct ops
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20261203/20261203132803.GZKi3lWU-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203132803.GZKi3lWU-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261203132803.GZKi3lWU-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from include/linux/bpf-cgroup.h:5,
from mm/bpf_oom.c:8:
mm/bpf_oom.c: In function 'bpf_oom_struct_ops_init':
>> include/linux/bpf.h:2505:50: warning: statement with no effect [-Wunused-value]
2505 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
| ^~~~~~~~~~~~~~~~
mm/bpf_oom.c:185:16: note: in expansion of macro 'register_bpf_struct_ops'
185 | return register_bpf_struct_ops(&bpf_oom_bpf_ops, bpf_oom_ops);
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +2505 include/linux/bpf.h
c196906d50e360d Hou Tao 2021-10-25 2495
c196906d50e360d Hou Tao 2021-10-25 2496 int bpf_struct_ops_test_run(struct bpf_prog *prog, const union bpf_attr *kattr,
c196906d50e360d Hou Tao 2021-10-25 2497 union bpf_attr __user *uattr);
c196906d50e360d Hou Tao 2021-10-25 2498 #endif
f6be98d19985411 Kui-Feng Lee 2024-01-19 2499 int bpf_struct_ops_desc_init(struct bpf_struct_ops_desc *st_ops_desc,
f6be98d19985411 Kui-Feng Lee 2024-01-19 2500 struct btf *btf,
f6be98d19985411 Kui-Feng Lee 2024-01-19 2501 struct bpf_verifier_log *log);
1338b93346587a2 Kui-Feng Lee 2024-01-19 2502 void bpf_map_struct_ops_info_fill(struct bpf_map_info *info, struct bpf_map *map);
1611603537a4b88 Kui-Feng Lee 2024-02-08 2503 void bpf_struct_ops_desc_release(struct bpf_struct_ops_desc *st_ops_desc);
27ae7997a66174c Martin KaFai Lau 2020-01-08 2504 #else
f6be98d19985411 Kui-Feng Lee 2024-01-19 @2505 #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
85d33df357b6346 Martin KaFai Lau 2020-01-08 2506 static inline bool bpf_try_module_get(const void *data, struct module *owner)
85d33df357b6346 Martin KaFai Lau 2020-01-08 2507 {
85d33df357b6346 Martin KaFai Lau 2020-01-08 2508 return try_module_get(owner);
85d33df357b6346 Martin KaFai Lau 2020-01-08 2509 }
85d33df357b6346 Martin KaFai Lau 2020-01-08 2510 static inline void bpf_module_put(const void *data, struct module *owner)
85d33df357b6346 Martin KaFai Lau 2020-01-08 2511 {
85d33df357b6346 Martin KaFai Lau 2020-01-08 2512 module_put(owner);
85d33df357b6346 Martin KaFai Lau 2020-01-08 2513 }
e42ac14180554fa Martin KaFai Lau 2024-07-22 2514 static inline int bpf_struct_ops_supported(const struct bpf_struct_ops *st_ops, u32 moff)
e42ac14180554fa Martin KaFai Lau 2024-07-22 2515 {
e42ac14180554fa Martin KaFai Lau 2024-07-22 2516 return -ENOTSUPP;
e42ac14180554fa Martin KaFai Lau 2024-07-22 2517 }
85d33df357b6346 Martin KaFai Lau 2020-01-08 2518 static inline int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map,
85d33df357b6346 Martin KaFai Lau 2020-01-08 2519 void *key,
85d33df357b6346 Martin KaFai Lau 2020-01-08 2520 void *value)
85d33df357b6346 Martin KaFai Lau 2020-01-08 2521 {
85d33df357b6346 Martin KaFai Lau 2020-01-08 2522 return -EINVAL;
85d33df357b6346 Martin KaFai Lau 2020-01-08 2523 }
466ae6570ce8140 Siddharth Nayyar 2026-12-01 2524
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki