Re: [PATCH] mm: Avoid unnecessary page fault retires on shared memory types

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

 



Hi Peter,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Peter-Xu/mm-Avoid-unnecessary-page-fault-retires-on-shared-memory-types/20220506-051845
base:   https://github.com/hnaz/linux-mm master
config: sparc-defconfig (https://download.01.org/0day-ci/archive/20220506/202205061513.jhn9vVtI-lkp@xxxxxxxxx/config)
compiler: sparc-linux-gcc (GCC) 11.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://github.com/intel-lab-lkp/linux/commit/e5356147afd3824144b605c428f1b892addd11d0
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Peter-Xu/mm-Avoid-unnecessary-page-fault-retires-on-shared-memory-types/20220506-051845
        git checkout e5356147afd3824144b605c428f1b892addd11d0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   arch/sparc/mm/fault_32.c: In function 'force_user_fault':
>> arch/sparc/mm/fault_32.c:347:13: error: 'fault' undeclared (first use in this function)
     347 |         if (fault & VM_FAULT_COMPLETED)
         |             ^~~~~
   arch/sparc/mm/fault_32.c:347:13: note: each undeclared identifier is reported only once for each function it appears in


vim +/fault +347 arch/sparc/mm/fault_32.c

   309	
   310	/* This always deals with user addresses. */
   311	static void force_user_fault(unsigned long address, int write)
   312	{
   313		struct vm_area_struct *vma;
   314		struct task_struct *tsk = current;
   315		struct mm_struct *mm = tsk->mm;
   316		unsigned int flags = FAULT_FLAG_USER;
   317		int code;
   318	
   319		code = SEGV_MAPERR;
   320	
   321		mmap_read_lock(mm);
   322		vma = find_vma(mm, address);
   323		if (!vma)
   324			goto bad_area;
   325		if (vma->vm_start <= address)
   326			goto good_area;
   327		if (!(vma->vm_flags & VM_GROWSDOWN))
   328			goto bad_area;
   329		if (expand_stack(vma, address))
   330			goto bad_area;
   331	good_area:
   332		code = SEGV_ACCERR;
   333		if (write) {
   334			if (!(vma->vm_flags & VM_WRITE))
   335				goto bad_area;
   336			flags |= FAULT_FLAG_WRITE;
   337		} else {
   338			if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
   339				goto bad_area;
   340		}
   341		switch (handle_mm_fault(vma, address, flags, NULL)) {
   342		case VM_FAULT_SIGBUS:
   343		case VM_FAULT_OOM:
   344			goto do_sigbus;
   345		}
   346		/* The fault is fully completed (including releasing mmap lock) */
 > 347		if (fault & VM_FAULT_COMPLETED)
   348			return;
   349		mmap_read_unlock(mm);
   350		return;
   351	bad_area:
   352		mmap_read_unlock(mm);
   353		__do_fault_siginfo(code, SIGSEGV, tsk->thread.kregs, address);
   354		return;
   355	
   356	do_sigbus:
   357		mmap_read_unlock(mm);
   358		__do_fault_siginfo(BUS_ADRERR, SIGBUS, tsk->thread.kregs, address);
   359	}
   360	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




[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