mm: PageBuddy and mapcount robustness
authorAndrea Arcangeli <aarcange@redhat.com>
Thu, 17 Mar 2011 23:16:35 +0000 (00:16 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2011 23:31:13 +0000 (16:31 -0700)
commitef2b4b95a63a1d23958dcb99eb2c6898eddc87d0
tree0a22745dba03926768552aa3006b166995e5342d
parent7b7adc4a016a1decb806eb71ecab98721fa7f146
mm: PageBuddy and mapcount robustness

Change the _mapcount value indicating PageBuddy from -2 to -128 for
more robusteness against page_mapcount() undeflows.

Use reset_page_mapcount instead of __ClearPageBuddy in bad_page to
ignore the previous retval of PageBuddy().

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c