diff options
| author | Mel Gorman <[email protected]> | 2010-04-23 17:17:56 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-04-24 18:31:25 +0000 |
| commit | 23be7468e8802a2ac1de6ee3eecb3ec7f14dc703 (patch) | |
| tree | 2c01e547594b8d7f32ddda47b6bea284d8f19761 /lib/debugobjects.c | |
| parent | w1: w1 temp: fix negative termperature calculation (diff) | |
| download | kernel-23be7468e8802a2ac1de6ee3eecb3ec7f14dc703.tar.gz kernel-23be7468e8802a2ac1de6ee3eecb3ec7f14dc703.zip | |
hugetlb: fix infinite loop in get_futex_key() when backed by huge pages
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.
[[email protected]: mel cant spel]
Signed-off-by: Mel Gorman <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Acked-by: Darren Hart <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
