thp+memcg-numa: fix BUG at include/linux/mm.h:370!
authorHugh Dickins <hughd@google.com>
Mon, 14 Mar 2011 08:08:47 +0000 (01:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 14 Mar 2011 15:29:50 +0000 (08:29 -0700)
commit2fbfac4e053861925fa3fffcdc327649b09af54c
tree36d9da87f5a42d61cd8be2fd02bab666cb8ac145
parentc44ed965be7a84afaa07543c04eb97a5dfe93422
thp+memcg-numa: fix BUG at include/linux/mm.h:370!

THP's collapse_huge_page() has an understandable but ugly difference
in when its huge page is allocated: inside if NUMA but outside if not.
It's hardly surprising that the memcg failure path forgot that, freeing
the page in the non-NUMA case, then hitting a VM_BUG_ON in get_page()
(or even worse, using the freed page).

Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c