diff options
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index b26dcfc02c94..c3a1a55a5214 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -61,6 +61,8 @@ | |||
61 | #include <linux/nsproxy.h> | 61 | #include <linux/nsproxy.h> |
62 | #include <linux/ptrace.h> | 62 | #include <linux/ptrace.h> |
63 | #include <linux/sched/rt.h> | 63 | #include <linux/sched/rt.h> |
64 | #include <linux/hugetlb.h> | ||
65 | #include <linux/freezer.h> | ||
64 | 66 | ||
65 | #include <asm/futex.h> | 67 | #include <asm/futex.h> |
66 | 68 | ||
@@ -365,7 +367,7 @@ again: | |||
365 | } else { | 367 | } else { |
366 | key->both.offset |= FUT_OFF_INODE; /* inode-based key */ | 368 | key->both.offset |= FUT_OFF_INODE; /* inode-based key */ |
367 | key->shared.inode = page_head->mapping->host; | 369 | key->shared.inode = page_head->mapping->host; |
368 | key->shared.pgoff = page_head->index; | 370 | key->shared.pgoff = basepage_index(page); |
369 | } | 371 | } |
370 | 372 | ||
371 | get_futex_key_refs(key); | 373 | get_futex_key_refs(key); |
@@ -1807,7 +1809,7 @@ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, | |||
1807 | * is no timeout, or if it has yet to expire. | 1809 | * is no timeout, or if it has yet to expire. |
1808 | */ | 1810 | */ |
1809 | if (!timeout || timeout->task) | 1811 | if (!timeout || timeout->task) |
1810 | schedule(); | 1812 | freezable_schedule(); |
1811 | } | 1813 | } |
1812 | __set_current_state(TASK_RUNNING); | 1814 | __set_current_state(TASK_RUNNING); |
1813 | } | 1815 | } |