Skip to content
Commit ce2ae53b authored by Sonny Rao's avatar Sonny Rao Committed by Ingo Molnar
Browse files

futexes: Fix infinite loop in get_futex_key() on huge page



get_futex_key() can infinitely loop if it is called on a
virtual address that is within a huge page but not aligned to
the beginning of that page.  The call to get_user_pages_fast
will return the struct page for a sub-page within the huge page
and the check for page->mapping will always fail.

The fix is to call compound_head on the page before checking
that it's mapped.

Signed-off-by: default avatarSonny Rao <sonnyrao@us.ibm.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Cc: anton@samba.org
Cc: rajamony@us.ibm.com
Cc: speight@us.ibm.com
Cc: mstephen@us.ibm.com
Cc: grimm@us.ibm.com
Cc: mikey@ozlabs.au.ibm.com
LKML-Reference: <20090710231313.GA23572@us.ibm.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f00caa76
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment