]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: change nr_ptes BUG_ON to WARN_ON
authorHugh Dickins <hughd@google.com>
Tue, 14 Aug 2012 03:22:23 +0000 (13:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 20 Aug 2012 07:07:58 +0000 (17:07 +1000)
commitf65e8328ef8126b4cf27ca66fa70833bb8ed2606
tree03e115f8cc5dab05154a54972581c833f9cab593
parent21fe5247e287b739599beb29e2347d00ba5e3286
mm: change nr_ptes BUG_ON to WARN_ON

Occasionally an isolated BUG_ON(mm->nr_ptes) gets reported, indicating
that not all the page tables allocated could be found and freed when
exit_mmap() tore down the user address space.

There's usually nothing we can say about it, beyond that it's probably a
sign of some bad memory or memory corruption; though it might still
indicate a bug in vma or page table management (and did recently reveal a
race in THP, fixed a few months ago).

But one overdue change we can make is from BUG_ON to WARN_ON.

It's fairly likely that the system will crash shortly afterwards in some
other way (for example, the BUG_ON(page_mapped(page)) in
__delete_from_page_cache(), once an inode mapped into the lost page tables
gets evicted); but might tell us more before that.

Change the BUG_ON(page_mapped) to WARN_ON too?  Later perhaps: I'm less
eager, since that one has several times led to fixes.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c