* [mmotm:master 310/355] mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one'
@ 2018-12-21 4:03 kbuild test robot
2018-12-21 18:23 ` Joel Fernandes
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-12-21 4:03 UTC (permalink / raw)
To: Joel Fernandes (Google)
Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 4730 bytes --]
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: 98c1d1d6a1d1553512e5db8c07a149c41e7c2f84
commit: 47931f365e6eaac24d1653e3ce00f69e76187c08 [310/355] mm: treewide: remove unused address argument from pte_alloc functions
config: x86_64-rhel-7.2-clear (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 47931f365e6eaac24d1653e3ce00f69e76187c08
# save the attached .config to linux build tree
make ARCH=x86_64
Note: the mmotm/master HEAD 98c1d1d6a1d1553512e5db8c07a149c41e7c2f84 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
mm/memory.c: In function '__do_fault':
>> mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one'
vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm, vmf->address);
^~~~~~~~~~~~~
In file included from arch/x86/include/asm/mmu_context.h:12:0,
from mm/memory.c:74:
arch/x86/include/asm/pgalloc.h:51:18: note: declared here
extern pgtable_t pte_alloc_one(struct mm_struct *);
^~~~~~~~~~~~~
vim +/pte_alloc_one +3007 mm/memory.c
^1da177e4 Linus Torvalds 2005-04-16 2991
9a95f3cf7 Paul Cassella 2014-08-06 2992 /*
9a95f3cf7 Paul Cassella 2014-08-06 2993 * The mmap_sem must have been held on entry, and may have been
9a95f3cf7 Paul Cassella 2014-08-06 2994 * released depending on flags and vma->vm_ops->fault() return value.
9a95f3cf7 Paul Cassella 2014-08-06 2995 * See filemap_fault() and __lock_page_retry().
9a95f3cf7 Paul Cassella 2014-08-06 2996 */
2b7403035 Souptick Joarder 2018-08-23 2997 static vm_fault_t __do_fault(struct vm_fault *vmf)
7eae74af3 Kirill A. Shutemov 2014-04-03 2998 {
82b0f8c39 Jan Kara 2016-12-14 2999 struct vm_area_struct *vma = vmf->vma;
2b7403035 Souptick Joarder 2018-08-23 3000 vm_fault_t ret;
7eae74af3 Kirill A. Shutemov 2014-04-03 3001
d85ec7561 Michal Hocko 2018-12-19 3002 /*
d85ec7561 Michal Hocko 2018-12-19 3003 * Preallocate pte before we take page_lock because this might lead to
d85ec7561 Michal Hocko 2018-12-19 3004 * deadlocks for memcg reclaim which waits for pages under writeback.
d85ec7561 Michal Hocko 2018-12-19 3005 */
d85ec7561 Michal Hocko 2018-12-19 3006 if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
d85ec7561 Michal Hocko 2018-12-19 @3007 vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm, vmf->address);
d85ec7561 Michal Hocko 2018-12-19 3008 if (!vmf->prealloc_pte)
d85ec7561 Michal Hocko 2018-12-19 3009 return VM_FAULT_OOM;
d85ec7561 Michal Hocko 2018-12-19 3010 smp_wmb(); /* See comment in __pte_alloc() */
d85ec7561 Michal Hocko 2018-12-19 3011 }
d85ec7561 Michal Hocko 2018-12-19 3012
11bac8000 Dave Jiang 2017-02-24 3013 ret = vma->vm_ops->fault(vmf);
3917048d4 Jan Kara 2016-12-14 3014 if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY |
b1aa812b2 Jan Kara 2016-12-14 3015 VM_FAULT_DONE_COW)))
bc2466e42 Jan Kara 2016-05-12 3016 return ret;
7eae74af3 Kirill A. Shutemov 2014-04-03 3017
667240e0f Jan Kara 2016-12-14 3018 if (unlikely(PageHWPoison(vmf->page))) {
7eae74af3 Kirill A. Shutemov 2014-04-03 3019 if (ret & VM_FAULT_LOCKED)
667240e0f Jan Kara 2016-12-14 3020 unlock_page(vmf->page);
667240e0f Jan Kara 2016-12-14 3021 put_page(vmf->page);
936ca80d3 Jan Kara 2016-12-14 3022 vmf->page = NULL;
7eae74af3 Kirill A. Shutemov 2014-04-03 3023 return VM_FAULT_HWPOISON;
7eae74af3 Kirill A. Shutemov 2014-04-03 3024 }
7eae74af3 Kirill A. Shutemov 2014-04-03 3025
7eae74af3 Kirill A. Shutemov 2014-04-03 3026 if (unlikely(!(ret & VM_FAULT_LOCKED)))
667240e0f Jan Kara 2016-12-14 3027 lock_page(vmf->page);
7eae74af3 Kirill A. Shutemov 2014-04-03 3028 else
667240e0f Jan Kara 2016-12-14 3029 VM_BUG_ON_PAGE(!PageLocked(vmf->page), vmf->page);
7eae74af3 Kirill A. Shutemov 2014-04-03 3030
7eae74af3 Kirill A. Shutemov 2014-04-03 3031 return ret;
7eae74af3 Kirill A. Shutemov 2014-04-03 3032 }
7eae74af3 Kirill A. Shutemov 2014-04-03 3033
:::::: The code at line 3007 was first introduced by commit
:::::: d85ec756157ff970b1412dd5958e8adab6a4e661 mm, memcg: fix reclaim deadlock with writeback
:::::: TO: Michal Hocko <mhocko@suse.com>
:::::: CC: Johannes Weiner <hannes@cmpxchg.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41513 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [mmotm:master 310/355] mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one'
2018-12-21 4:03 [mmotm:master 310/355] mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one' kbuild test robot
@ 2018-12-21 18:23 ` Joel Fernandes
0 siblings, 0 replies; 2+ messages in thread
From: Joel Fernandes @ 2018-12-21 18:23 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List
On Fri, Dec 21, 2018 at 12:03:00PM +0800, kbuild test robot wrote:
> tree: git://git.cmpxchg.org/linux-mmotm.git master
> head: 98c1d1d6a1d1553512e5db8c07a149c41e7c2f84
> commit: 47931f365e6eaac24d1653e3ce00f69e76187c08 [310/355] mm: treewide: remove unused address argument from pte_alloc functions
> config: x86_64-rhel-7.2-clear (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> git checkout 47931f365e6eaac24d1653e3ce00f69e76187c08
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> Note: the mmotm/master HEAD 98c1d1d6a1d1553512e5db8c07a149c41e7c2f84 builds fine.
> It only hurts bisectibility.
>
> All errors (new ones prefixed by >>):
>
> mm/memory.c: In function '__do_fault':
> >> mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one'
> vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm, vmf->address);
> ^~~~~~~~~~~~~
> In file included from arch/x86/include/asm/mmu_context.h:12:0,
> from mm/memory.c:74:
> arch/x86/include/asm/pgalloc.h:51:18: note: declared here
> extern pgtable_t pte_alloc_one(struct mm_struct *);
> ^~~~~~~~~~~~~
>
> vim +/pte_alloc_one +3007 mm/memory.c
>
> ^1da177e4 Linus Torvalds 2005-04-16 2991
> 9a95f3cf7 Paul Cassella 2014-08-06 2992 /*
> 9a95f3cf7 Paul Cassella 2014-08-06 2993 * The mmap_sem must have been held on entry, and may have been
> 9a95f3cf7 Paul Cassella 2014-08-06 2994 * released depending on flags and vma->vm_ops->fault() return value.
> 9a95f3cf7 Paul Cassella 2014-08-06 2995 * See filemap_fault() and __lock_page_retry().
> 9a95f3cf7 Paul Cassella 2014-08-06 2996 */
> 2b7403035 Souptick Joarder 2018-08-23 2997 static vm_fault_t __do_fault(struct vm_fault *vmf)
> 7eae74af3 Kirill A. Shutemov 2014-04-03 2998 {
> 82b0f8c39 Jan Kara 2016-12-14 2999 struct vm_area_struct *vma = vmf->vma;
> 2b7403035 Souptick Joarder 2018-08-23 3000 vm_fault_t ret;
> 7eae74af3 Kirill A. Shutemov 2014-04-03 3001
> d85ec7561 Michal Hocko 2018-12-19 3002 /*
> d85ec7561 Michal Hocko 2018-12-19 3003 * Preallocate pte before we take page_lock because this might lead to
> d85ec7561 Michal Hocko 2018-12-19 3004 * deadlocks for memcg reclaim which waits for pages under writeback.
> d85ec7561 Michal Hocko 2018-12-19 3005 */
> d85ec7561 Michal Hocko 2018-12-19 3006 if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) {
> d85ec7561 Michal Hocko 2018-12-19 @3007 vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm, vmf->address);
Taking a look at linux-next, this has already been fixed so I believe the
report is based on an older kernel.
thanks,
- Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-21 18:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21 4:03 [mmotm:master 310/355] mm/memory.c:3007:23: error: too many arguments to function 'pte_alloc_one' kbuild test robot
2018-12-21 18:23 ` Joel Fernandes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox