[tip:tmp.tmp 15/21] kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'

From: kernel test robot
Date: Wed Mar 24 2021 - 06:22:22 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp
head: 5965a7adbd72dd9b288c0911cb73719fed1efa08
commit: 18970ac4e37011fd0c709b6c2a640f01eecf2dd7 [15/21] locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs
config: s390-randconfig-r034-20210324 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a4fb88669cd98db6fef7dcac88e3ec425d40c00d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=18970ac4e37011fd0c709b6c2a640f01eecf2dd7
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip tmp.tmp
git checkout 18970ac4e37011fd0c709b6c2a640f01eecf2dd7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from kernel/rcu/tree.c:48:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from kernel/rcu/tree.c:48:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from kernel/rcu/tree.c:48:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:271:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:278:15: note: expanded from macro '__unqual_scalar_typeof'
default: (x)))
^
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:28: error: no member named 'pi_waiters' in 'struct task_struct'
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
~ ^
include/linux/rbtree.h:40:42: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
^~~~
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
>> kernel/rcu/../locking/rtmutex_common.h:58:10: error: invalid operands to binary expression ('void' and 'void *')
return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rbtree.h:40:58: note: expanded from macro 'RB_EMPTY_ROOT'
#define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
kernel/rcu/../locking/rtmutex_common.h:63:21: error: no member named 'pi_waiters' in 'struct task_struct'
return rb_entry(p->pi_waiters.rb_leftmost, struct rt_mutex_waiter,
~ ^
include/linux/rbtree.h:38:50: note: expanded from macro 'rb_entry'
#define rb_entry(ptr, type, member) container_of(ptr, type, member)
^~~
include/linux/kernel.h:708:26: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
kernel/rcu/../locking/rtmutex_common.h:63:21: error: no member named 'pi_waiters' in 'struct task_struct'
return rb_entry(p->pi_waiters.rb_leftmost, struct rt_mutex_waiter,
~ ^
include/linux/rbtree.h:38:50: note: expanded from macro 'rb_entry'
#define rb_entry(ptr, type, member) container_of(ptr, type, member)
^~~
include/linux/kernel.h:709:34: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from kernel/rcu/tree.c:4671:
In file included from kernel/rcu/tree_plugin.h:14:
kernel/rcu/../locking/rtmutex_common.h:63:21: error: no member named 'pi_waiters' in 'struct task_struct'
return rb_entry(p->pi_waiters.rb_leftmost, struct rt_mutex_waiter,
~ ^
include/linux/rbtree.h:38:50: note: expanded from macro 'rb_entry'
#define rb_entry(ptr, type, member) container_of(ptr, type, member)
^~~
include/linux/kernel.h:710:20: note: expanded from macro 'container_of'
!__same_type(*(ptr), void), \
^~~
include/linux/compiler_types.h:256:63: note: expanded from macro '__same_type'
#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
12 warnings and 12 errors generated.


vim +58 kernel/rcu/../locking/rtmutex_common.h

23f78d4a03c53c kernel/rtmutex_common.h Ingo Molnar 2006-06-27 55
23f78d4a03c53c kernel/rtmutex_common.h Ingo Molnar 2006-06-27 56 static inline int task_has_pi_waiters(struct task_struct *p)
23f78d4a03c53c kernel/rtmutex_common.h Ingo Molnar 2006-06-27 57 {
a23ba907d5e65d kernel/locking/rtmutex_common.h Davidlohr Bueso 2017-09-08 @58 return !RB_EMPTY_ROOT(&p->pi_waiters.rb_root);
23f78d4a03c53c kernel/rtmutex_common.h Ingo Molnar 2006-06-27 59 }
23f78d4a03c53c kernel/rtmutex_common.h Ingo Molnar 2006-06-27 60

:::::: The code at line 58 was first introduced by commit
:::::: a23ba907d5e65d6aeea3e59c82fda9cd206a7aad locking/rtmutex: replace top-waiter and pi_waiters leftmost caching

:::::: TO: Davidlohr Bueso <dave@xxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip