All of lore.kernel.org
 help / color / mirror / Atom feed
* [rgushchin:bpfoom.3.9 8/16] mm/bpf_oom.c:107:13: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2026-01-15 16:55 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-15 16:55 UTC (permalink / raw)
  To: Roman Gushchin; +Cc: oe-kbuild-all

tree:   https://github.com/rgushchin/linux.git bpfoom.3.9
head:   9d2b723568aae6a6f7e41fc66f65f8b009690b6e
commit: 36dfd96fa3fbd7d4057fe22dfa657b62a9b6865b [8/16] mm: introduce BPF OOM struct ops
config: x86_64-randconfig-123-20260115 (https://download.01.org/0day-ci/archive/20260116/202601160032.yInQO0DO-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260116/202601160032.yInQO0DO-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/202601160032.yInQO0DO-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   mm/bpf_oom.c:51:58: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct bpf_map *map @@     got struct bpf_map [noderef] __rcu *map @@
   mm/bpf_oom.c:51:58: sparse:     expected struct bpf_map *map
   mm/bpf_oom.c:51:58: sparse:     got struct bpf_map [noderef] __rcu *map
>> mm/bpf_oom.c:107:13: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct bpf_struct_ops_link [noderef] __rcu *__new @@     got struct bpf_struct_ops_link *st_link @@
   mm/bpf_oom.c:107:13: sparse:     expected struct bpf_struct_ops_link [noderef] __rcu *__new
   mm/bpf_oom.c:107:13: sparse:     got struct bpf_struct_ops_link *st_link
   mm/bpf_oom.c:125:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct bpf_struct_ops_link [noderef] __rcu *__old @@     got struct bpf_struct_ops_link *st_link @@
   mm/bpf_oom.c:125:9: sparse:     expected struct bpf_struct_ops_link [noderef] __rcu *__old
   mm/bpf_oom.c:125:9: sparse:     got struct bpf_struct_ops_link *st_link
   mm/bpf_oom.c:125:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/bpf_oom.c:125:9: sparse:    struct bpf_struct_ops_link [noderef] __rcu *
   mm/bpf_oom.c:125:9: sparse:    struct bpf_struct_ops_link *

vim +107 mm/bpf_oom.c

    93	
    94	static int bpf_oom_ops_reg(void *kdata, struct bpf_link *link)
    95	{
    96		struct bpf_struct_ops_link *st_link = (struct bpf_struct_ops_link *)link;
    97		struct cgroup *cgrp;
    98	
    99		/* The link is not yet fully initialized, but cgroup should be set */
   100		if (!link)
   101			return -EOPNOTSUPP;
   102	
   103		cgrp = st_link->cgroup;
   104		if (!cgrp)
   105			return -EINVAL;
   106	
 > 107		if (cmpxchg(&cgrp->bpf.bpf_oom_link, NULL, st_link))
   108			return -EEXIST;
   109	
   110		return 0;
   111	}
   112	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-15 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 16:55 [rgushchin:bpfoom.3.9 8/16] mm/bpf_oom.c:107:13: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot

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.