Hugh Dickins a4f1de1766 mm: fix kernel BUG at huge_memory.c:1474!
Andrea's autonuma-benchmark numa01 hits kernel BUG at huge_memory.c:1474!
in change_huge_pmd called from change_protection from change_prot_numa
from task_numa_work.

That BUG, introduced in the huge zero page commit cad7f613c4d0 ("thp:
change_huge_pmd(): make sure we don't try to make a page writable")
was trying to verify that newprot never adds write permission to an
anonymous huge page; but Automatic NUMA Balancing's 4b10e7d562c9 ("mm:
mempolicy: Implement change_prot_numa() in terms of change_protection()")
adds a new prot_numa path into change_huge_pmd(), which makes no use of
the newprot provided, and may retain the write bit in the pmd.

Just move the BUG_ON(pmd_write(entry)) up into the !prot_numa block.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-16 19:02:38 -08:00
..
2012-05-29 23:28:33 -04:00
2012-12-16 15:18:08 -08:00
2012-01-03 22:54:56 -05:00
2012-12-16 15:18:08 -08:00
2011-07-26 16:49:47 -07:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-10-09 16:23:03 +09:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-12-16 15:18:08 -08:00
2012-06-20 14:39:36 -07:00
2012-12-16 15:18:08 -08:00
2012-10-09 16:22:55 +09:00
2012-10-28 19:29:19 +01:00
2012-12-16 15:18:08 -08:00