Re: [PATCH 1/3] mm: shift VM_GROWS* check from mmap_region() to do_mmap_pgoff()

2013-07-19 Thread Hugh Dickins
On Tue, 16 Jul 2013, Andrew Morton wrote: > On Sun, 14 Jul 2013 18:54:51 +0200 Oleg Nesterov wrote: > > > mmap() doesn't allow the non-anonymous mappings with VM_GROWS* bit set. > > In particular this means that mmap_region()->vma_merge(file, vm_flags) > > must always fail if vm_flags &

Re: [PATCH 1/3] mm: shift VM_GROWS* check from mmap_region() to do_mmap_pgoff()

2013-07-19 Thread Hugh Dickins
On Tue, 16 Jul 2013, Andrew Morton wrote: On Sun, 14 Jul 2013 18:54:51 +0200 Oleg Nesterov o...@redhat.com wrote: mmap() doesn't allow the non-anonymous mappings with VM_GROWS* bit set. In particular this means that mmap_region()-vma_merge(file, vm_flags) must always fail if vm_flags

Re: [PATCH 1/3] mm: shift VM_GROWS* check from mmap_region() to do_mmap_pgoff()

2013-07-16 Thread Andrew Morton
On Sun, 14 Jul 2013 18:54:51 +0200 Oleg Nesterov wrote: > mmap() doesn't allow the non-anonymous mappings with VM_GROWS* bit set. > In particular this means that mmap_region()->vma_merge(file, vm_flags) > must always fail if vm_flags & VM_GROWS. So it does not make sense to > check VM_GROWS*

Re: [PATCH 1/3] mm: shift VM_GROWS* check from mmap_region() to do_mmap_pgoff()

2013-07-16 Thread Andrew Morton
On Sun, 14 Jul 2013 18:54:51 +0200 Oleg Nesterov o...@redhat.com wrote: mmap() doesn't allow the non-anonymous mappings with VM_GROWS* bit set. In particular this means that mmap_region()-vma_merge(file, vm_flags) must always fail if vm_flags VM_GROWS. So it does not make sense to check

[PATCH 1/3] mm: shift VM_GROWS* check from mmap_region() to do_mmap_pgoff()

2013-07-14 Thread Oleg Nesterov
mmap() doesn't allow the non-anonymous mappings with VM_GROWS* bit set. In particular this means that mmap_region()->vma_merge(file, vm_flags) must always fail if vm_flags & VM_GROWS. So it does not make sense to check VM_GROWS* after we already allocated the new vma, the only caller,

[PATCH 1/3] mm: shift VM_GROWS* check from mmap_region() to do_mmap_pgoff()

2013-07-14 Thread Oleg Nesterov
mmap() doesn't allow the non-anonymous mappings with VM_GROWS* bit set. In particular this means that mmap_region()-vma_merge(file, vm_flags) must always fail if vm_flags VM_GROWS. So it does not make sense to check VM_GROWS* after we already allocated the new vma, the only caller,