futex: fix handling of read-only-mapped hugepages
The hugepage code had the exact same bug that regular pages had in
commit
7485d0d3758e ("futexes: Remove rw parameter from
get_futex_key()").
The regular page case was fixed by commit
9ea71503a8ed ("futex: Fix
regression with read only mappings"), but the transparent hugepage case
(added in
a5b338f2b0b1: "thp: update futex compound knowledge") case
remained broken.
Found by Dave Jones and his trinity tool.
Reported-and-tested-by: Dave Jones <[email protected]>
Cc: [email protected] # v2.6.38+
Acked-by: Thomas Gleixner <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Darren Hart <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>