mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: kernel/events/uprobes.c:2038:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
Date: Mon, 16 Feb 2026 09:22:45 +0800	[thread overview]
Message-ID: <202602160931.CnnMtX4E-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   26a4cfaff82a2dcb810f6bfd5f4842f9b6046c8a
commit: dd1a7567784e2b1f80258be04f57bcfa82c997eb uprobes: SRCU-protect uretprobe lifetime (with timeout)
date:   1 year, 4 months ago
config: x86_64-randconfig-121-20260216 (https://download.01.org/0day-ci/archive/20260216/202602160931.CnnMtX4E-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/20260216/202602160931.CnnMtX4E-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/202602160931.CnnMtX4E-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> kernel/events/uprobes.c:2038:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/uprobes.c:2038:17: sparse:    struct return_instance [noderef] __rcu *
   kernel/events/uprobes.c:2038:17: sparse:    struct return_instance *
   kernel/events/uprobes.c:2119:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/uprobes.c:2119:9: sparse:    struct return_instance [noderef] __rcu *
   kernel/events/uprobes.c:2119:9: sparse:    struct return_instance *
   kernel/events/uprobes.c:2178:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/uprobes.c:2178:9: sparse:    struct return_instance [noderef] __rcu *
   kernel/events/uprobes.c:2178:9: sparse:    struct return_instance *
   kernel/events/uprobes.c:2237:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/events/uprobes.c:2239:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/events/uprobes.c:2498:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/uprobes.c:2498:25: sparse:    struct return_instance [noderef] __rcu *
   kernel/events/uprobes.c:2498:25: sparse:    struct return_instance *
   kernel/events/uprobes.c:2626:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/events/uprobes.c:2628:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __rcu * @@
   kernel/events/uprobes.c: note: in included file (through include/linux/rculist.h, include/linux/dcache.h, include/linux/fs.h, ...):
   include/linux/rcupdate.h:880:25: sparse: sparse: context imbalance in '__replace_page' - unexpected unlock
   kernel/events/uprobes.c:730:17: sparse: sparse: context imbalance in 'hprobe_finalize' - unexpected unlock
   kernel/events/uprobes.c:798:25: sparse: sparse: context imbalance in 'hprobe_expire' - unexpected unlock
   kernel/events/uprobes.c: note: in included file (through include/linux/mm_types.h, include/linux/mmzone.h, include/linux/gfp.h, ...):
   include/linux/rbtree.h:74:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   include/linux/rbtree.h:74:9: sparse:    struct rb_node [noderef] __rcu *
   include/linux/rbtree.h:74:9: sparse:    struct rb_node *

vim +2038 kernel/events/uprobes.c

  2005	
  2006	static int dup_utask(struct task_struct *t, struct uprobe_task *o_utask)
  2007	{
  2008		struct uprobe_task *n_utask;
  2009		struct return_instance **p, *o, *n;
  2010		struct uprobe *uprobe;
  2011	
  2012		n_utask = alloc_utask();
  2013		if (!n_utask)
  2014			return -ENOMEM;
  2015		t->utask = n_utask;
  2016	
  2017		/* protect uprobes from freeing, we'll need try_get_uprobe() them */
  2018		guard(srcu)(&uretprobes_srcu);
  2019	
  2020		p = &n_utask->return_instances;
  2021		for (o = o_utask->return_instances; o; o = o->next) {
  2022			n = dup_return_instance(o);
  2023			if (!n)
  2024				return -ENOMEM;
  2025	
  2026			/* if uprobe is non-NULL, we'll have an extra refcount for uprobe */
  2027			uprobe = hprobe_expire(&o->hprobe, true);
  2028	
  2029			/*
  2030			 * New utask will have stable properly refcounted uprobe or
  2031			 * NULL. Even if we failed to get refcounted uprobe, we still
  2032			 * need to preserve full set of return_instances for proper
  2033			 * uretprobe handling and nesting in forked task.
  2034			 */
  2035			hprobe_init_stable(&n->hprobe, uprobe);
  2036	
  2037			n->next = NULL;
> 2038			rcu_assign_pointer(*p, n);
  2039			p = &n->next;
  2040	
  2041			n_utask->depth++;
  2042		}
  2043	
  2044		return 0;
  2045	}
  2046	

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

                 reply	other threads:[~2026-02-16  1:23 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=202602160931.CnnMtX4E-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®