All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [rgushchin:bpfoom.3.9 8/16] mm/bpf_oom.c:107:13: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Fri, 16 Jan 2026 00:55:20 +0800	[thread overview]
Message-ID: <202601160032.yInQO0DO-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-01-15 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202601160032.yInQO0DO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=roman.gushchin@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 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.