All of lore.kernel.org
 help / color / mirror / Atom feed
* [paulmckrcu:dev.2026.09.09a 42/56] kernel/rcu/tree_stall.h:332:48: warning: comparison between pointer and integer ('int' and 'struct task_struct *')
@ 2026-09-11 16:28 kernel test robot
  2026-09-11 17:10 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-09-11 16:28 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/paulmckrcu/linux dev.2026.09.09a
head:   d61d9b5dd56c6cf72b70bb5fb52b213ead9f7765
commit: e33488c41be623f7c7ef5b8763e20c45f1364d1c [42/56] rcu: Add running and boosted indications to RCU task stall dump
config: powerpc-tqm8xx_defconfig (https://download.01.org/0day-ci/archive/20260912/202609120047.u7Af769s-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260912/202609120047.u7Af769s-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/202609120047.u7Af769s-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/rcu/tree.c:5112:
   kernel/rcu/tree_stall.h:332:8: error: call to undeclared function 'rt_mutex_owner'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     332 |                         if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
         |                             ^
>> kernel/rcu/tree_stall.h:332:48: warning: comparison between pointer and integer ('int' and 'struct task_struct *') [-Wpointer-integer-compare]
     332 |                         if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
         |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~
   In file included from kernel/rcu/tree.c:5115:
   In file included from kernel/rcu/tree_plugin.h:14:
   kernel/rcu/../locking/rtmutex_common.h:231:35: error: conflicting types for 'rt_mutex_owner'
     231 | static inline struct task_struct *rt_mutex_owner(struct rt_mutex_base *lock)
         |                                   ^
   kernel/rcu/tree_stall.h:332:8: note: previous implicit declaration is here
     332 |                         if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
         |                             ^
   1 warning and 2 errors generated.


vim +332 kernel/rcu/tree_stall.h

   311	
   312	/*
   313	 * Report out the state of a not-running task that is stalling the
   314	 * current RCU grace period.
   315	 */
   316	static int check_slow_task(struct task_struct *t, void *arg)
   317	{
   318		struct rcu_node *rnp;
   319		struct rcu_stall_chk_rdr *rscrp = arg;
   320	
   321		if (task_curr(t))
   322			return -EBUSY; // It is running, so decline to inspect it.
   323		rscrp->nesting = t->rcu_read_lock_nesting;
   324		rscrp->rs = t->rcu_read_unlock_special;
   325		rscrp->on_blkd_list = !list_empty(&t->rcu_node_entry);
   326		rscrp->rcu_rdr_running = task_curr(t);
   327		rscrp->rcu_rdr_boosted = 0;
   328		if (rscrp->on_blkd_list) {
   329			rnp = READ_ONCE(t->rcu_blocked_node);
   330			raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
   331			if (rnp == READ_ONCE(t->rcu_blocked_node)) {
 > 332				if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
   333					rscrp->rcu_rdr_boosted = 1;
   334			} else {
   335				rscrp->rcu_rdr_boosted = 2;
   336			}
   337			raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */
   338		}
   339		return 0;
   340	}
   341	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [paulmckrcu:dev.2026.09.09a 42/56] kernel/rcu/tree_stall.h:332:48: warning: comparison between pointer and integer ('int' and 'struct task_struct *')
  2026-09-11 16:28 [paulmckrcu:dev.2026.09.09a 42/56] kernel/rcu/tree_stall.h:332:48: warning: comparison between pointer and integer ('int' and 'struct task_struct *') kernel test robot
@ 2026-09-11 17:10 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2026-09-11 17:10 UTC (permalink / raw)
  To: kernel test robot; +Cc: llvm, oe-kbuild-all

On Sat, Sep 12, 2026 at 12:28:38AM +0800, kernel test robot wrote:
> tree:   https://github.com/paulmckrcu/linux dev.2026.09.09a
> head:   d61d9b5dd56c6cf72b70bb5fb52b213ead9f7765
> commit: e33488c41be623f7c7ef5b8763e20c45f1364d1c [42/56] rcu: Add running and boosted indications to RCU task stall dump
> config: powerpc-tqm8xx_defconfig (https://download.01.org/0day-ci/archive/20260912/202609120047.u7Af769s-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260912/202609120047.u7Af769s-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/202609120047.u7Af769s-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from kernel/rcu/tree.c:5112:
>    kernel/rcu/tree_stall.h:332:8: error: call to undeclared function 'rt_mutex_owner'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      332 |                         if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
>          |                             ^
> >> kernel/rcu/tree_stall.h:332:48: warning: comparison between pointer and integer ('int' and 'struct task_struct *') [-Wpointer-integer-compare]
>      332 |                         if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
>          |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~
>    In file included from kernel/rcu/tree.c:5115:
>    In file included from kernel/rcu/tree_plugin.h:14:
>    kernel/rcu/../locking/rtmutex_common.h:231:35: error: conflicting types for 'rt_mutex_owner'
>      231 | static inline struct task_struct *rt_mutex_owner(struct rt_mutex_base *lock)
>          |                                   ^
>    kernel/rcu/tree_stall.h:332:8: note: previous implicit declaration is here
>      332 |                         if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
>          |                             ^
>    1 warning and 2 errors generated.

Good catch, updating this patch with attribution to #include rtmutex.h.

Thank you for your testing efforts!

							Thanx, Paul

> vim +332 kernel/rcu/tree_stall.h
> 
>    311	
>    312	/*
>    313	 * Report out the state of a not-running task that is stalling the
>    314	 * current RCU grace period.
>    315	 */
>    316	static int check_slow_task(struct task_struct *t, void *arg)
>    317	{
>    318		struct rcu_node *rnp;
>    319		struct rcu_stall_chk_rdr *rscrp = arg;
>    320	
>    321		if (task_curr(t))
>    322			return -EBUSY; // It is running, so decline to inspect it.
>    323		rscrp->nesting = t->rcu_read_lock_nesting;
>    324		rscrp->rs = t->rcu_read_unlock_special;
>    325		rscrp->on_blkd_list = !list_empty(&t->rcu_node_entry);
>    326		rscrp->rcu_rdr_running = task_curr(t);
>    327		rscrp->rcu_rdr_boosted = 0;
>    328		if (rscrp->on_blkd_list) {
>    329			rnp = READ_ONCE(t->rcu_blocked_node);
>    330			raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
>    331			if (rnp == READ_ONCE(t->rcu_blocked_node)) {
>  > 332				if (rt_mutex_owner(&rnp->boost_mtx.rtmutex) == t)
>    333					rscrp->rcu_rdr_boosted = 1;
>    334			} else {
>    335				rscrp->rcu_rdr_boosted = 2;
>    336			}
>    337			raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */
>    338		}
>    339		return 0;
>    340	}
>    341	
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-11 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 16:28 [paulmckrcu:dev.2026.09.09a 42/56] kernel/rcu/tree_stall.h:332:48: warning: comparison between pointer and integer ('int' and 'struct task_struct *') kernel test robot
2026-09-11 17:10 ` Paul E. McKenney

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.