tree:   
https://kernel.googlesource.com/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
dev.2019.09.23a
head:   97de53b94582c208ee239178b208b8e8b9472585
commit: 89538f9f8dda5e7738d71f179f9321740b680734 [50/77] rcu: Add crude 
self-test for early boot kfree_rcu()
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 89538f9f8dda5e7738d71f179f9321740b680734
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <l...@intel.com>

Note: the rcu/dev.2019.09.23a HEAD 97de53b94582c208ee239178b208b8e8b9472585 
builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   kernel//rcu/update.c: In function 'early_boot_test_call_rcu':
>> kernel//rcu/update.c:869:8: error: implicit declaration of function 
>> 'kmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
     rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
           ^~~~~~~
           kvmalloc
>> kernel//rcu/update.c:869:6: warning: assignment makes pointer from integer 
>> without a cast [-Wint-conversion]
     rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
         ^
   In file included from include/linux/rbtree.h:22:0,
                    from include/linux/hrtimer.h:16,
                    from include/linux/interrupt.h:13,
                    from kernel//rcu/update.c:25:
>> include/linux/rcupdate.h:840:15: error: passing argument 1 of 
>> 'kfree_call_rcu' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
      __kfree_rcu(&((___p)->rhf), offsetof(typeof(*(ptr)), rhf)); \
                  ^
   include/linux/rcupdate.h:806:18: note: in definition of macro '__kfree_rcu'
      kfree_call_rcu(head, (rcu_callback_t)(unsigned long)(offset)); \
                     ^~~~
>> kernel//rcu/update.c:871:3: note: in expansion of macro 'kfree_rcu'
      kfree_rcu(rhp, rh);
      ^~~~~~~~~
   In file included from include/linux/rcupdate.h:171:0,
                    from include/linux/rbtree.h:22,
                    from include/linux/hrtimer.h:16,
                    from include/linux/interrupt.h:13,
                    from kernel//rcu/update.c:25:
   include/linux/rcutree.h:36:6: note: expected 'struct callback_head *' but 
argument is of type 'struct callback_head **'
    void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func);
         ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   kernel/rcu/update.c: In function 'early_boot_test_call_rcu':
   kernel/rcu/update.c:869:8: error: implicit declaration of function 
'kmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
     rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
           ^~~~~~~
           kvmalloc
   kernel/rcu/update.c:869:6: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
     rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
         ^
   In file included from include/linux/rbtree.h:22:0,
                    from include/linux/hrtimer.h:16,
                    from include/linux/interrupt.h:13,
                    from kernel/rcu/update.c:25:
>> include/linux/rcupdate.h:840:15: error: passing argument 1 of 
>> 'kfree_call_rcu' from incompatible pointer type 
>> [-Werror=incompatible-pointer-types]
      __kfree_rcu(&((___p)->rhf), offsetof(typeof(*(ptr)), rhf)); \
                  ^
   include/linux/rcupdate.h:806:18: note: in definition of macro '__kfree_rcu'
      kfree_call_rcu(head, (rcu_callback_t)(unsigned long)(offset)); \
                     ^~~~
   kernel/rcu/update.c:871:3: note: in expansion of macro 'kfree_rcu'
      kfree_rcu(rhp, rh);
      ^~~~~~~~~
   In file included from include/linux/rcupdate.h:171:0,
                    from include/linux/rbtree.h:22,
                    from include/linux/hrtimer.h:16,
                    from include/linux/interrupt.h:13,
                    from kernel/rcu/update.c:25:
   include/linux/rcutree.h:36:6: note: expected 'struct callback_head *' but 
argument is of type 'struct callback_head **'
    void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func);
         ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/kfree_rcu +871 kernel//rcu/update.c

   859  
   860  static void early_boot_test_call_rcu(void)
   861  {
   862          static struct rcu_head head;
   863          static struct rcu_head shead;
   864          struct early_boot_kfree_rcu *rhp;
   865  
   866          call_rcu(&head, test_callback);
   867          if (IS_ENABLED(CONFIG_SRCU))
   868                  call_srcu(&early_srcu, &shead, test_callback);
 > 869          rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
   870          if (!WARN_ON_ONCE(!rhp))
 > 871                  kfree_rcu(rhp, rh);
   872  }
   873  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to