CC: [email protected]
CC: [email protected]
TO: Michel Lespinasse <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Linux Memory Management List <[email protected]>
CC: Vlastimil Babka <[email protected]>
CC: Davidlohr Bueso <[email protected]>
CC: Daniel Jordan <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   cd796ed3345030aa1bb332fe5c793b3dddaf56e7
commit: da1c55f1b272f4bd54671d459b39ea7b54944ef9 mmap locking API: rename 
mmap_sem to mmap_lock
date:   6 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 6 months ago
config: powerpc64-randconfig-m031-20201208 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
arch/powerpc/mm/fault.c:644 __do_page_fault() warn: inconsistent returns 
'mm->mmap_lock'.

vim +644 arch/powerpc/mm/fault.c

fe4a6856cb4f43 Aneesh Kumar K.V       2020-05-05  601  
bd0d63f8095ae6 Benjamin Herrenschmidt 2017-07-19  602   if 
(unlikely(access_error(is_write, is_exec, vma)))
ecb101aed86156 John Sperbeck          2017-12-31  603           return 
bad_access(regs, address);
14cf11af6cf608 Paul Mackerras         2005-09-26  604  
14cf11af6cf608 Paul Mackerras         2005-09-26  605   /*
14cf11af6cf608 Paul Mackerras         2005-09-26  606    * If for any reason at 
all we couldn't handle the fault,
14cf11af6cf608 Paul Mackerras         2005-09-26  607    * make sure we exit 
gracefully rather than endlessly redo
14cf11af6cf608 Paul Mackerras         2005-09-26  608    * the fault.
14cf11af6cf608 Paul Mackerras         2005-09-26  609    */
dcddffd41d3f1d Kirill A. Shutemov     2016-07-26  610   fault = 
handle_mm_fault(vma, address, flags);
e6c2a4797e101a Ram Pai                2018-01-18  611  
f43bb27ebf27ee Benjamin Herrenschmidt 2017-07-19  612   major |= fault & 
VM_FAULT_MAJOR;
14c02e419a395c Laurent Dufour         2017-02-14  613  
c9a0dad1620141 Peter Xu               2020-04-01  614   if 
(fault_signal_pending(fault, regs))
c9a0dad1620141 Peter Xu               2020-04-01  615           return 
user_mode(regs) ? 0 : SIGBUS;
c9a0dad1620141 Peter Xu               2020-04-01  616  
14c02e419a395c Laurent Dufour         2017-02-14  617   /*
14c02e419a395c Laurent Dufour         2017-02-14  618    * Handle the retry 
right now, the mmap_sem has been released in that
14c02e419a395c Laurent Dufour         2017-02-14  619    * case.
14c02e419a395c Laurent Dufour         2017-02-14  620    */
14c02e419a395c Laurent Dufour         2017-02-14  621   if (unlikely(fault & 
VM_FAULT_RETRY)) {
14c02e419a395c Laurent Dufour         2017-02-14  622           if (flags & 
FAULT_FLAG_ALLOW_RETRY) {
14c02e419a395c Laurent Dufour         2017-02-14  623                   flags 
|= FAULT_FLAG_TRIED;
14c02e419a395c Laurent Dufour         2017-02-14  624                   goto 
retry;
14c02e419a395c Laurent Dufour         2017-02-14  625           }
14cf11af6cf608 Paul Mackerras         2005-09-26  626   }
9be72573a80648 Benjamin Herrenschmidt 2012-03-01  627  
d8ed45c5dcd455 Michel Lespinasse      2020-06-08  628   
mmap_read_unlock(current->mm);
b5c8f0fd595d25 Benjamin Herrenschmidt 2017-07-19  629  
b5c8f0fd595d25 Benjamin Herrenschmidt 2017-07-19  630   if (unlikely(fault & 
VM_FAULT_ERROR))
b5c8f0fd595d25 Benjamin Herrenschmidt 2017-07-19  631           return 
mm_fault_error(regs, address, fault);
b5c8f0fd595d25 Benjamin Herrenschmidt 2017-07-19  632  
9be72573a80648 Benjamin Herrenschmidt 2012-03-01  633   /*
14c02e419a395c Laurent Dufour         2017-02-14  634    * Major/minor page 
fault accounting.
9be72573a80648 Benjamin Herrenschmidt 2012-03-01  635    */
f43bb27ebf27ee Benjamin Herrenschmidt 2017-07-19  636   if (major) {
83c54070ee1a2d Nick Piggin            2007-07-19  637           
current->maj_flt++;
04aafdc6018fee Benjamin Herrenschmidt 2017-07-19  638           
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
3da026480a7536 Benjamin Herrenschmidt 2017-07-19  639           
cmo_account_page_fault();
ac17dc8e58f306 Peter Zijlstra         2009-03-13  640   } else {
83c54070ee1a2d Nick Piggin            2007-07-19  641           
current->min_flt++;
04aafdc6018fee Benjamin Herrenschmidt 2017-07-19  642           
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
ac17dc8e58f306 Peter Zijlstra         2009-03-13  643   }
65d47fd4a37cbd Benjamin Herrenschmidt 2017-07-19 @644   return 0;
14cf11af6cf608 Paul Mackerras         2005-09-26  645  }
7afad422ac6106 Benjamin Herrenschmidt 2017-07-19  646  
NOKPROBE_SYMBOL(__do_page_fault);
7afad422ac6106 Benjamin Herrenschmidt 2017-07-19  647  

:::::: The code at line 644 was first introduced by commit
:::::: 65d47fd4a37cbd60d0737cdae09edf1d208364d7 powerpc/mm: Simplify returns 
from __do_page_fault

:::::: TO: Benjamin Herrenschmidt <[email protected]>
:::::: CC: Michael Ellerman <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to