All of lore.kernel.org
 help / color / mirror / Atom feed
* [axboe-block:misc-next 3/3] mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'?
@ 2021-09-18 18:05 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-18 18:05 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 8133 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git misc-next
head:   43d923f7b1db8b930041fd2d3fe174991592a6da
commit: 43d923f7b1db8b930041fd2d3fe174991592a6da [3/3] mm: don't call should_failslab() for !CONFIG_FAILSLAB
config: h8300-randconfig-r022-20210918 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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/axboe/linux-block.git/commit/?id=43d923f7b1db8b930041fd2d3fe174991592a6da
        git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
        git fetch --no-tags axboe-block misc-next
        git checkout 43d923f7b1db8b930041fd2d3fe174991592a6da
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300 

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

All errors (new ones prefixed by >>):

   In file included from mm/slab.c:132:
   mm/slab.h: In function 'slab_pre_alloc_hook':
>> mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? [-Werror=implicit-function-declaration]
     495 |         if (should_failslab(s, flags))
         |             ^~~~~~~~~~~~~~~
         |             should_fail
   In file included from arch/h8300/include/asm/page.h:5,
                    from arch/h8300/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from mm/slab.c:90:
   mm/slab.c: In function 'kfree_debugcheck':
   include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
      89 | #define virt_addr_valid(kaddr)  (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                   ^~
   mm/slab.c:2678:14: note: in expansion of macro 'virt_addr_valid'
    2678 |         if (!virt_addr_valid(objp)) {
         |              ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from mm/failslab.c:5:
   mm/slab.h: In function 'slab_pre_alloc_hook':
>> mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? [-Werror=implicit-function-declaration]
     495 |         if (should_failslab(s, flags))
         |             ^~~~~~~~~~~~~~~
         |             should_fail
   cc1: some warnings being treated as errors
--
   In file included from mm/slab_common.c:33:
   mm/slab.h: In function 'slab_pre_alloc_hook':
>> mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? [-Werror=implicit-function-declaration]
     495 |         if (should_failslab(s, flags))
         |             ^~~~~~~~~~~~~~~
         |             should_fail
   In file included from arch/h8300/include/asm/page.h:5,
                    from arch/h8300/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from mm/slab_common.c:7:
   mm/slab_common.c: In function 'kmem_valid_obj':
   include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
      89 | #define virt_addr_valid(kaddr)  (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                   ^~
   mm/slab_common.c:564:44: note: in expansion of macro 'virt_addr_valid'
     564 |         if (object < (void *)PAGE_SIZE || !virt_addr_valid(object))
         |                                            ^~~~~~~~~~~~~~~
   In file included from arch/h8300/include/asm/bug.h:8,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from mm/slab_common.c:7:
   mm/slab_common.c: In function 'kmem_dump_obj':
   include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
      89 | #define virt_addr_valid(kaddr)  (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                   ^~
   include/asm-generic/bug.h:166:32: note: in definition of macro 'WARN_ON'
     166 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   mm/slab_common.c:594:13: note: in expansion of macro 'WARN_ON_ONCE'
     594 |         if (WARN_ON_ONCE(!virt_addr_valid(object)))
         |             ^~~~~~~~~~~~
   mm/slab_common.c:594:27: note: in expansion of macro 'virt_addr_valid'
     594 |         if (WARN_ON_ONCE(!virt_addr_valid(object)))
         |                           ^~~~~~~~~~~~~~~
   mm/slab_common.c: At top level:
   mm/slab_common.c:1326:5: warning: no previous prototype for 'should_failslab' [-Wmissing-prototypes]
    1326 | int should_failslab(struct kmem_cache *s, gfp_t gfpflags)
         |     ^~~~~~~~~~~~~~~
   mm/slab_common.c:1170:30: warning: 'slabinfo_proc_ops' defined but not used [-Wunused-const-variable=]
    1170 | static const struct proc_ops slabinfo_proc_ops = {
         |                              ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +495 mm/slab.h

11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  485  
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  486  static inline struct kmem_cache *slab_pre_alloc_hook(struct kmem_cache *s,
964d4bd370d559 Roman Gushchin         2020-08-06  487  						     struct obj_cgroup **objcgp,
964d4bd370d559 Roman Gushchin         2020-08-06  488  						     size_t size, gfp_t flags)
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  489  {
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  490  	flags &= gfp_allowed_mask;
d92a8cfcb37ecd Peter Zijlstra         2017-03-03  491  
95d6c701f4ca7c Daniel Vetter          2020-12-14  492  	might_alloc(flags);
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  493  
43d923f7b1db8b Jens Axboe             2021-09-18  494  #ifdef CONFIG_FAILSLAB
fab9963a69dbd7 Jesper Dangaard Brouer 2016-03-15 @495  	if (should_failslab(s, flags))
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  496  		return NULL;
43d923f7b1db8b Jens Axboe             2021-09-18  497  #endif
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  498  
becaba65f62f88 Roman Gushchin         2020-12-05  499  	if (!memcg_slab_pre_alloc_hook(s, objcgp, size, flags))
becaba65f62f88 Roman Gushchin         2020-12-05  500  		return NULL;
452647784b2fcc Vladimir Davydov       2016-07-26  501  
452647784b2fcc Vladimir Davydov       2016-07-26  502  	return s;
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  503  }
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  504  

:::::: The code at line 495 was first introduced by commit
:::::: fab9963a69dbd71304357dbfe4ec5345f14cebdd mm: fault-inject take over bootstrap kmem_cache check

:::::: TO: Jesper Dangaard Brouer <brouer@redhat.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28792 bytes --]

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

* [axboe-block:misc-next 3/3] mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'?
@ 2021-09-18 18:05 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-18 18:05 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8274 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git misc-next
head:   43d923f7b1db8b930041fd2d3fe174991592a6da
commit: 43d923f7b1db8b930041fd2d3fe174991592a6da [3/3] mm: don't call should_failslab() for !CONFIG_FAILSLAB
config: h8300-randconfig-r022-20210918 (attached as .config)
compiler: h8300-linux-gcc (GCC) 11.2.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/axboe/linux-block.git/commit/?id=43d923f7b1db8b930041fd2d3fe174991592a6da
        git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
        git fetch --no-tags axboe-block misc-next
        git checkout 43d923f7b1db8b930041fd2d3fe174991592a6da
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=h8300 

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

All errors (new ones prefixed by >>):

   In file included from mm/slab.c:132:
   mm/slab.h: In function 'slab_pre_alloc_hook':
>> mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? [-Werror=implicit-function-declaration]
     495 |         if (should_failslab(s, flags))
         |             ^~~~~~~~~~~~~~~
         |             should_fail
   In file included from arch/h8300/include/asm/page.h:5,
                    from arch/h8300/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from mm/slab.c:90:
   mm/slab.c: In function 'kfree_debugcheck':
   include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
      89 | #define virt_addr_valid(kaddr)  (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                   ^~
   mm/slab.c:2678:14: note: in expansion of macro 'virt_addr_valid'
    2678 |         if (!virt_addr_valid(objp)) {
         |              ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from mm/failslab.c:5:
   mm/slab.h: In function 'slab_pre_alloc_hook':
>> mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? [-Werror=implicit-function-declaration]
     495 |         if (should_failslab(s, flags))
         |             ^~~~~~~~~~~~~~~
         |             should_fail
   cc1: some warnings being treated as errors
--
   In file included from mm/slab_common.c:33:
   mm/slab.h: In function 'slab_pre_alloc_hook':
>> mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? [-Werror=implicit-function-declaration]
     495 |         if (should_failslab(s, flags))
         |             ^~~~~~~~~~~~~~~
         |             should_fail
   In file included from arch/h8300/include/asm/page.h:5,
                    from arch/h8300/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:55,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from mm/slab_common.c:7:
   mm/slab_common.c: In function 'kmem_valid_obj':
   include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
      89 | #define virt_addr_valid(kaddr)  (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                   ^~
   mm/slab_common.c:564:44: note: in expansion of macro 'virt_addr_valid'
     564 |         if (object < (void *)PAGE_SIZE || !virt_addr_valid(object))
         |                                            ^~~~~~~~~~~~~~~
   In file included from arch/h8300/include/asm/bug.h:8,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from mm/slab_common.c:7:
   mm/slab_common.c: In function 'kmem_dump_obj':
   include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
      89 | #define virt_addr_valid(kaddr)  (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                   ^~
   include/asm-generic/bug.h:166:32: note: in definition of macro 'WARN_ON'
     166 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   mm/slab_common.c:594:13: note: in expansion of macro 'WARN_ON_ONCE'
     594 |         if (WARN_ON_ONCE(!virt_addr_valid(object)))
         |             ^~~~~~~~~~~~
   mm/slab_common.c:594:27: note: in expansion of macro 'virt_addr_valid'
     594 |         if (WARN_ON_ONCE(!virt_addr_valid(object)))
         |                           ^~~~~~~~~~~~~~~
   mm/slab_common.c: At top level:
   mm/slab_common.c:1326:5: warning: no previous prototype for 'should_failslab' [-Wmissing-prototypes]
    1326 | int should_failslab(struct kmem_cache *s, gfp_t gfpflags)
         |     ^~~~~~~~~~~~~~~
   mm/slab_common.c:1170:30: warning: 'slabinfo_proc_ops' defined but not used [-Wunused-const-variable=]
    1170 | static const struct proc_ops slabinfo_proc_ops = {
         |                              ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +495 mm/slab.h

11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  485  
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  486  static inline struct kmem_cache *slab_pre_alloc_hook(struct kmem_cache *s,
964d4bd370d559 Roman Gushchin         2020-08-06  487  						     struct obj_cgroup **objcgp,
964d4bd370d559 Roman Gushchin         2020-08-06  488  						     size_t size, gfp_t flags)
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  489  {
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  490  	flags &= gfp_allowed_mask;
d92a8cfcb37ecd Peter Zijlstra         2017-03-03  491  
95d6c701f4ca7c Daniel Vetter          2020-12-14  492  	might_alloc(flags);
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  493  
43d923f7b1db8b Jens Axboe             2021-09-18  494  #ifdef CONFIG_FAILSLAB
fab9963a69dbd7 Jesper Dangaard Brouer 2016-03-15 @495  	if (should_failslab(s, flags))
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  496  		return NULL;
43d923f7b1db8b Jens Axboe             2021-09-18  497  #endif
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  498  
becaba65f62f88 Roman Gushchin         2020-12-05  499  	if (!memcg_slab_pre_alloc_hook(s, objcgp, size, flags))
becaba65f62f88 Roman Gushchin         2020-12-05  500  		return NULL;
452647784b2fcc Vladimir Davydov       2016-07-26  501  
452647784b2fcc Vladimir Davydov       2016-07-26  502  	return s;
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  503  }
11c7aec2a9b4e6 Jesper Dangaard Brouer 2016-03-15  504  

:::::: The code at line 495 was first introduced by commit
:::::: fab9963a69dbd71304357dbfe4ec5345f14cebdd mm: fault-inject take over bootstrap kmem_cache check

:::::: TO: Jesper Dangaard Brouer <brouer@redhat.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28792 bytes --]

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

end of thread, other threads:[~2021-09-18 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 18:05 [axboe-block:misc-next 3/3] mm/slab.h:495:13: error: implicit declaration of function 'should_failslab'; did you mean 'should_fail'? kernel test robot
2021-09-18 18:05 ` kernel test robot

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.