1. 15 4月, 2011 6 次提交
  2. 13 4月, 2011 2 次提交
    • L
      vm: fix vm_pgoff wrap in stack expansion · a626ca6a
      Linus Torvalds 提交于
      Commit 982134ba ("mm: avoid wrapping vm_pgoff in mremap()") fixed
      the case of a expanding mapping causing vm_pgoff wrapping when you used
      mremap.  But there was another case where we expand mappings hiding in
      plain sight: the automatic stack expansion.
      
      This fixes that case too.
      
      This one also found by Robert Święcki, using his nasty system call
      fuzzer tool.  Good job.
      Reported-and-tested-by: NRobert Święcki <robert@swiecki.net>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a626ca6a
    • L
      vm: fix mlock() on stack guard page · 95042f9e
      Linus Torvalds 提交于
      Commit 53a7706d ("mlock: do not hold mmap_sem for extended periods
      of time") changed mlock() to care about the exact number of pages that
      __get_user_pages() had brought it.  Before, it would only care about
      errors.
      
      And that doesn't work, because we also handled one page specially in
      __mlock_vma_pages_range(), namely the stack guard page.  So when that
      case was handled, the number of pages that the function returned was off
      by one.  In particular, it could be zero, and then the caller would end
      up not making any progress at all.
      
      Rather than try to fix up that off-by-one error for the mlock case
      specially, this just moves the logic to handle the stack guard page
      into__get_user_pages() itself, thus making all the counts come out
      right automatically.
      Reported-by: NRobert Święcki <robert@swiecki.net>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      95042f9e
  3. 07 4月, 2011 1 次提交
  4. 31 3月, 2011 1 次提交
  5. 29 3月, 2011 1 次提交
  6. 28 3月, 2011 2 次提交
    • D
      NOMMU: percpu should use is_vmalloc_addr(). · eac522ef
      David Howells 提交于
      per_cpu_ptr_to_phys() uses VMALLOC_START and VMALLOC_END to determine if an
      address is in the vmalloc() region or not.  This is incorrect on NOMMU as
      there is no real vmalloc() capability (vmalloc() is emulated by kmalloc()).
      
      The correct way to do this is to use is_vmalloc_addr().  This encapsulates the
      vmalloc() region test in MMU mode and just returns 0 in NOMMU mode.
      
      On FRV in NOMMU mode, the percpu compilation fails without this patch:
      
      mm/percpu.c: In function 'per_cpu_ptr_to_phys':
      mm/percpu.c:1011: error: 'VMALLOC_START' undeclared (first use in this function)
      mm/percpu.c:1011: error: (Each undeclared identifier is reported only once
      mm/percpu.c:1011: error: for each function it appears in.)
      mm/percpu.c:1012: error: 'VMALLOC_END' undeclared (first use in this function)
      mm/percpu.c:1018: warning: control reaches end of non-void function
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      eac522ef
    • R
      mm: fix memory.c incorrect kernel-doc · ae91dbfc
      Randy Dunlap 提交于
      Fix mm/memory.c incorrect kernel-doc function notation:
      
        Warning(mm/memory.c:3718): Cannot understand  * @access_remote_vm - access another process' address space
         on line 3718 - I thought it was a doc line
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ae91dbfc
  7. 25 3月, 2011 5 次提交
  8. 24 3月, 2011 22 次提交