Hugh Dickins d99be1a8ec mm: sigbus instead of abusing oom
When do_nonlinear_fault() realizes that the page table must have been
corrupted for it to have been called, it does print_bad_pte() and returns
...  VM_FAULT_OOM, which is hard to understand.

It made some sense when I did it for 2.6.15, when do_page_fault() just
killed the current process; but nowadays it lets the OOM killer decide who
to kill - so page table corruption in one process would be liable to kill
another.

Change it to return VM_FAULT_SIGBUS instead: that doesn't guarantee that
the process will be killed, but is good enough for such a rare
abnormality, accompanied as it is by the "BUG: Bad page map" message.

And recent HWPOISON work has copied that code into do_swap_page(), when it
finds an impossible swap entry: fix that to VM_FAULT_SIGBUS too.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Izik Eidus <ieidus@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Nick Piggin <npiggin@suse.de>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andi Kleen <andi@firstfloor.org>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:17 -08:00
..
2009-12-03 13:49:43 +01:00
2009-11-10 12:31:43 +01:00
2009-04-01 08:59:13 -07:00
2009-12-10 15:02:50 +01:00
2009-06-16 19:47:28 -07:00
2009-12-15 08:53:17 -08:00
2009-12-15 08:53:17 -08:00
2009-11-09 09:55:44 -08:00
2009-10-02 13:29:29 +09:00
2009-12-15 08:53:17 -08:00
2009-12-15 08:53:17 -08:00
2009-09-22 07:17:35 -07:00
2009-12-15 08:53:17 -08:00
2009-12-15 08:53:17 -08:00
2009-12-15 08:53:17 -08:00
2009-12-15 08:53:16 -08:00
2009-12-15 08:53:17 -08:00
2009-12-15 08:53:16 -08:00
2009-12-15 08:53:17 -08:00
2009-06-23 12:50:05 -07:00