Re: [PATCH 1/1] mm: oom: let oom_reap_task and exit_mmap to run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrea,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc2 next-20170727]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrea-Arcangeli/mm-oom-let-oom_reap_task-and-exit_mmap-to-run/20170728-082915
config: x86_64-randconfig-x013-201730 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from mm/mmap.c:11:
   mm/mmap.c: In function 'exit_mmap':
   mm/mmap.c:2997:6: error: implicit declaration of function 'tsk_is_oom_victim' [-Werror=implicit-function-declaration]
     if (tsk_is_oom_victim(current)) {
         ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> mm/mmap.c:2997:2: note: in expansion of macro 'if'
     if (tsk_is_oom_victim(current)) {
     ^~
   mm/mmap.c: At top level:
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:390:2: note: in expansion of macro 'if'
     if (p_size == (size_t)-1 && q_size == (size_t)-1)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:380:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:378:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:369:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:367:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:358:2: note: in expansion of macro 'if'
     if (p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:356:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(size) && p_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:348:2: note: in expansion of macro 'if'
     if (p_size < size || q_size < size)
     ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:345:3: note: in expansion of macro 'if'
      if (q_size < size)
      ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:343:3: note: in expansion of macro 'if'
      if (p_size < size)
      ^~
   include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
       ______f = {     \
       ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   include/linux/string.h:342:2: note: in expansion of macro 'if'

vim +/if +2997 mm/mmap.c

  2963	
  2964	/* Release all mmaps. */
  2965	void exit_mmap(struct mm_struct *mm)
  2966	{
  2967		struct mmu_gather tlb;
  2968		struct vm_area_struct *vma;
  2969		unsigned long nr_accounted = 0;
  2970	
  2971		/* mm's last user has gone, and its about to be pulled down */
  2972		mmu_notifier_release(mm);
  2973	
  2974		if (mm->locked_vm) {
  2975			vma = mm->mmap;
  2976			while (vma) {
  2977				if (vma->vm_flags & VM_LOCKED)
  2978					munlock_vma_pages_all(vma);
  2979				vma = vma->vm_next;
  2980			}
  2981		}
  2982	
  2983		arch_exit_mmap(mm);
  2984	
  2985		vma = mm->mmap;
  2986		if (!vma)	/* Can happen if dup_mmap() received an OOM */
  2987			return;
  2988	
  2989		lru_add_drain();
  2990		flush_cache_mm(mm);
  2991		tlb_gather_mmu(&tlb, mm, 0, -1);
  2992		/* update_hiwater_rss(mm) here? but nobody should be looking */
  2993		/* Use -1 here to ensure all VMAs in the mm are unmapped */
  2994		unmap_vmas(&tlb, vma, 0, -1);
  2995	
  2996		set_bit(MMF_OOM_SKIP, &mm->flags);
> 2997		if (tsk_is_oom_victim(current)) {
  2998			/*
  2999			 * Wait for oom_reap_task() to stop working on this
  3000			 * mm. Because MMF_OOM_SKIP is already set before
  3001			 * calling down_read(), oom_reap_task() will not run
  3002			 * on this "mm" post up_write().
  3003			 *
  3004			 * tsk_is_oom_victim() cannot be set from under us
  3005			 * either because current->mm is already set to NULL
  3006			 * under task_lock before calling mmput and oom_mm is
  3007			 * set not NULL by the OOM killer only if current->mm
  3008			 * is found not NULL while holding the task_lock.
  3009			 */
  3010			down_write(&mm->mmap_sem);
  3011			up_write(&mm->mmap_sem);
  3012		}
  3013		free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING);
  3014		tlb_finish_mmu(&tlb, 0, -1);
  3015	
  3016		/*
  3017		 * Walk the list again, actually closing and freeing it,
  3018		 * with preemption enabled, without holding any MM locks.
  3019		 */
  3020		while (vma) {
  3021			if (vma->vm_flags & VM_ACCOUNT)
  3022				nr_accounted += vma_pages(vma);
  3023			vma = remove_vma(vma);
  3024		}
  3025		vm_unacct_memory(nr_accounted);
  3026	}
  3027	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux