Hugh Dickins 16abfa0860 Fix sys_remap_file_pages BUG at highmem.c:15!
Gurudas Pai reports kernel BUG at arch/i386/mm/highmem.c:15! below
sys_remap_file_pages, while running Oracle database test on x86 in 6GB
RAM: kunmap thinks we're in_interrupt because the preempt count has
wrapped.

That's because __do_fault expected to unmap page_table, but one of its
two callers do_nonlinear_fault already unmapped it: let do_linear_fault
unmap it first too, and then there's no need to pass the page_table arg
down.

Why have we been so slow to notice this? Probably through forgetting
that the mapping_cap_account_dirty test means that sys_remap_file_pages
nowadays only goes the full nonlinear vma route on a few memory-backed
filesystems like ramfs, tmpfs and hugetlbfs.

[ It also depends on CONFIG_HIGHPTE, so it becomes even harder to
  trigger in practice. Many who have need of large memory have probably
  migrated to x86-64..

  Problem introduced by commit d0217ac04ca6591841e5665f518e38064f4e65bd
  ("mm: fault feedback #1")                -- Linus ]

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: gurudas pai <gurudas.pai@oracle.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-04 10:13:09 -07:00
..
2007-07-19 10:04:41 -07:00
2007-07-17 10:22:59 -07:00
2007-08-31 01:42:22 -07:00
2007-02-15 09:57:03 -08:00
2007-07-19 10:04:45 -07:00
2007-05-21 09:18:19 -07:00
2007-07-31 15:39:36 -07:00
2005-04-16 15:20:36 -07:00
2007-05-07 12:12:54 -07:00
2007-07-21 17:49:16 -07:00
2007-07-18 08:47:39 -07:00
2007-07-29 17:09:29 -07:00