Files
linux/mm
Mel Gorman a988a17814 hugetlb: fix infinite loop in get_futex_key() when backed by huge pages
commit 23be7468e8 upstream.

If a futex key happens to be located within a huge page mapped
MAP_PRIVATE, get_futex_key() can go into an infinite loop waiting for a
page->mapping that will never exist.

See https://bugzilla.redhat.com/show_bug.cgi?id=552257 for more details
about the problem.

This patch makes page->mapping a poisoned value that includes
PAGE_MAPPING_ANON mapped MAP_PRIVATE.  This is enough for futex to
continue but because of PAGE_MAPPING_ANON, the poisoned value is not
dereferenced or used by futex.  No other part of the VM should be
dereferencing the page->mapping of a hugetlbfs page as its page cache is
not on the LRU.

This patch fixes the problem with the test case described in the bugzilla.

[akpm@linux-foundation.org: mel cant spel]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Darren Hart <darren@dvhart.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-12 14:57:01 -07:00
..
2009-04-01 08:59:13 -07:00
2009-06-16 19:47:28 -07:00
2010-01-06 15:05:22 -08:00
2010-01-06 15:05:22 -08:00
2010-05-12 14:57:00 -07:00
2009-12-18 14:05:51 -08:00
2010-04-01 15:58:27 -07:00
2009-09-22 07:17:35 -07:00
2010-01-06 15:05:22 -08:00
2010-01-18 10:19:11 -08:00
2010-01-18 10:19:11 -08:00
2009-10-01 16:11:12 -07:00
2009-06-23 12:50:05 -07:00
2010-01-22 15:18:41 -08:00
2010-01-18 10:19:11 -08:00
2009-09-22 07:17:29 -07:00