lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 3 Feb 2021 06:43:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [rcu:willy-maple 132/202] include/linux/kernel.h:694:51: error:
 'struct vm_region' has no member named 'vm_rb'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git willy-maple
head:   7e346d2845b4bd77663394f39fa70456e0084c86
commit: 25b065e50d69b0bb569d8b59f904eb9ad8566f31 [132/202] mm: Remove rb tree.
config: riscv-nommu_k210_defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=25b065e50d69b0bb569d8b59f904eb9ad8566f31
        git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
        git fetch --no-tags rcu willy-maple
        git checkout 25b065e50d69b0bb569d8b59f904eb9ad8566f31
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

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

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   mm/nommu.c: In function 'add_nommu_region':
>> include/linux/kernel.h:694:51: error: 'struct vm_region' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:477:13: note: in expansion of macro 'rb_entry'
     477 |   pregion = rb_entry(parent, struct vm_region, vm_rb);
         |             ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_region' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:477:13: note: in expansion of macro 'rb_entry'
     477 |   pregion = rb_entry(parent, struct vm_region, vm_rb);
         |             ^~~~~~~~
   mm/nommu.c:488:22: error: 'struct vm_region' has no member named 'vm_rb'
     488 |  rb_link_node(&region->vm_rb, parent, p);
         |                      ^~
   mm/nommu.c:489:25: error: 'struct vm_region' has no member named 'vm_rb'
     489 |  rb_insert_color(&region->vm_rb, &nommu_region_tree);
         |                         ^~
   mm/nommu.c: In function 'delete_nommu_region':
   mm/nommu.c:502:18: error: 'struct vm_region' has no member named 'vm_rb'
     502 |  rb_erase(&region->vm_rb, &nommu_region_tree);
         |                  ^~
   mm/nommu.c: In function 'add_vma_to_mm':
   mm/nommu.c:587:9: error: 'struct mm_struct' has no member named 'mm_rb'
     587 |  p = &mm->mm_rb.rb_node;
         |         ^~
   In file included from <command-line>:
>> include/linux/kernel.h:694:51: error: 'struct vm_area_struct' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:590:10: note: in expansion of macro 'rb_entry'
     590 |   pvma = rb_entry(parent, struct vm_area_struct, vm_rb);
         |          ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_area_struct' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:590:10: note: in expansion of macro 'rb_entry'
     590 |   pvma = rb_entry(parent, struct vm_area_struct, vm_rb);
         |          ^~~~~~~~
   mm/nommu.c:613:19: error: 'struct vm_area_struct' has no member named 'vm_rb'
     613 |  rb_link_node(&vma->vm_rb, parent, p);
         |                   ^~
   mm/nommu.c:614:22: error: 'struct vm_area_struct' has no member named 'vm_rb'
     614 |  rb_insert_color(&vma->vm_rb, &mm->mm_rb);
         |                      ^~
   mm/nommu.c:614:34: error: 'struct mm_struct' has no member named 'mm_rb'
     614 |  rb_insert_color(&vma->vm_rb, &mm->mm_rb);
         |                                  ^~
   In file included from <command-line>:
>> include/linux/kernel.h:694:51: error: 'struct vm_area_struct' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:619:10: note: in expansion of macro 'rb_entry'
     619 |   prev = rb_entry(rb_prev, struct vm_area_struct, vm_rb);
         |          ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_area_struct' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:619:10: note: in expansion of macro 'rb_entry'
     619 |   prev = rb_entry(rb_prev, struct vm_area_struct, vm_rb);
         |          ^~~~~~~~
   mm/nommu.c: In function 'delete_vma_from_mm':
   mm/nommu.c:655:15: error: 'struct vm_area_struct' has no member named 'vm_rb'
     655 |  rb_erase(&vma->vm_rb, &mm->mm_rb);
         |               ^~
   mm/nommu.c:655:27: error: 'struct mm_struct' has no member named 'mm_rb'
     655 |  rb_erase(&vma->vm_rb, &mm->mm_rb);
         |                           ^~
   In file included from <command-line>:
   mm/nommu.c: In function 'do_mmap':
>> include/linux/kernel.h:694:51: error: 'struct vm_region' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:1141:14: note: in expansion of macro 'rb_entry'
    1141 |    pregion = rb_entry(rb, struct vm_region, vm_rb);
         |              ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_region' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   mm/nommu.c:1141:14: note: in expansion of macro 'rb_entry'
    1141 |    pregion = rb_entry(rb, struct vm_region, vm_rb);
         |              ^~~~~~~~
   mm/nommu.c: At top level:
   mm/nommu.c:1658:15: warning: no previous prototype for 'arch_get_unmapped_area' [-Wmissing-prototypes]
    1658 | unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr,
         |               ^~~~~~~~~~~~~~~~~~~~~~
--
   In file included from <command-line>:
   fs/proc/nommu.c: In function 'nommu_region_list_show':
>> include/linux/kernel.h:694:51: error: 'struct vm_region' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/nommu.c:77:30: note: in expansion of macro 'rb_entry'
      77 |  return nommu_region_show(m, rb_entry(p, struct vm_region, vm_rb));
         |                              ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_region' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/nommu.c:77:30: note: in expansion of macro 'rb_entry'
      77 |  return nommu_region_show(m, rb_entry(p, struct vm_region, vm_rb));
         |                              ^~~~~~~~
   fs/proc/nommu.c:78:1: error: control reaches end of non-void function [-Werror=return-type]
      78 | }
         | ^
   cc1: some warnings being treated as errors
--
   fs/proc/task_nommu.c: In function 'task_mem':
>> fs/proc/task_nommu.c:29:23: error: 'struct mm_struct' has no member named 'mm_rb'
      29 |  for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) {
         |                       ^~
   In file included from <command-line>:
>> include/linux/kernel.h:694:51: error: 'struct vm_area_struct' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:30:9: note: in expansion of macro 'rb_entry'
      30 |   vma = rb_entry(p, struct vm_area_struct, vm_rb);
         |         ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_area_struct' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:30:9: note: in expansion of macro 'rb_entry'
      30 |   vma = rb_entry(p, struct vm_area_struct, vm_rb);
         |         ^~~~~~~~
   fs/proc/task_nommu.c: In function 'task_vsize':
   fs/proc/task_nommu.c:90:23: error: 'struct mm_struct' has no member named 'mm_rb'
      90 |  for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) {
         |                       ^~
   In file included from <command-line>:
>> include/linux/kernel.h:694:51: error: 'struct vm_area_struct' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:91:9: note: in expansion of macro 'rb_entry'
      91 |   vma = rb_entry(p, struct vm_area_struct, vm_rb);
         |         ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_area_struct' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:91:9: note: in expansion of macro 'rb_entry'
      91 |   vma = rb_entry(p, struct vm_area_struct, vm_rb);
         |         ^~~~~~~~
   fs/proc/task_nommu.c: In function 'task_statm':
   fs/proc/task_nommu.c:108:23: error: 'struct mm_struct' has no member named 'mm_rb'
     108 |  for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) {
         |                       ^~
   In file included from <command-line>:
>> include/linux/kernel.h:694:51: error: 'struct vm_area_struct' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:109:9: note: in expansion of macro 'rb_entry'
     109 |   vma = rb_entry(p, struct vm_area_struct, vm_rb);
         |         ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_area_struct' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:109:9: note: in expansion of macro 'rb_entry'
     109 |   vma = rb_entry(p, struct vm_area_struct, vm_rb);
         |         ^~~~~~~~
   fs/proc/task_nommu.c: In function 'show_map':
>> include/linux/kernel.h:694:51: error: 'struct vm_area_struct' has no member named 'vm_rb'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
     300 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
     320 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:20: note: in expansion of macro '__same_type'
     694 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:195:27: note: in expansion of macro 'rb_entry'
     195 |  return nommu_vma_show(m, rb_entry(p, struct vm_area_struct, vm_rb));
         |                           ^~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct vm_area_struct' has no member named 'vm_rb'
     140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:697:21: note: in expansion of macro 'offsetof'
     697 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
   include/linux/rbtree.h:38:37: note: in expansion of macro 'container_of'
      38 | #define rb_entry(ptr, type, member) container_of(ptr, type, member)
         |                                     ^~~~~~~~~~~~
   fs/proc/task_nommu.c:195:27: note: in expansion of macro 'rb_entry'
     195 |  return nommu_vma_show(m, rb_entry(p, struct vm_area_struct, vm_rb));
         |                           ^~~~~~~~
   fs/proc/task_nommu.c: In function 'm_start':
   fs/proc/task_nommu.c:220:23: error: 'struct mm_struct' has no member named 'mm_rb'
     220 |  for (p = rb_first(&mm->mm_rb); p; p = rb_next(p))
         |                       ^~
   fs/proc/task_nommu.c: In function 'show_map':
   fs/proc/task_nommu.c:196:1: error: control reaches end of non-void function [-Werror=return-type]
     196 | }
         | ^
   cc1: some warnings being treated as errors


vim +694 include/linux/kernel.h

cf14f27f82af78 Alexei Starovoitov 2018-03-28  684  
^1da177e4c3f41 Linus Torvalds     2005-04-16  685  /**
^1da177e4c3f41 Linus Torvalds     2005-04-16  686   * container_of - cast a member of a structure out to the containing structure
^1da177e4c3f41 Linus Torvalds     2005-04-16  687   * @ptr:	the pointer to the member.
^1da177e4c3f41 Linus Torvalds     2005-04-16  688   * @type:	the type of the container struct this is embedded in.
^1da177e4c3f41 Linus Torvalds     2005-04-16  689   * @member:	the name of the member within the struct.
^1da177e4c3f41 Linus Torvalds     2005-04-16  690   *
^1da177e4c3f41 Linus Torvalds     2005-04-16  691   */
^1da177e4c3f41 Linus Torvalds     2005-04-16  692  #define container_of(ptr, type, member) ({				\
c7acec713d14c6 Ian Abbott         2017-07-12  693  	void *__mptr = (void *)(ptr);					\
c7acec713d14c6 Ian Abbott         2017-07-12 @694  	BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&	\
c7acec713d14c6 Ian Abbott         2017-07-12  695  			 !__same_type(*(ptr), void),			\
c7acec713d14c6 Ian Abbott         2017-07-12  696  			 "pointer type mismatch in container_of()");	\
c7acec713d14c6 Ian Abbott         2017-07-12  697  	((type *)(__mptr - offsetof(type, member))); })
^1da177e4c3f41 Linus Torvalds     2005-04-16  698  

:::::: The code at line 694 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()

:::::: TO: Ian Abbott <abbotti@....co.uk>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

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

Download attachment ".config.gz" of type "application/gzip" (6585 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ