From d204a52d32a7581b0a92e9a70d9d5d4ccdba5f66 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 25 Jul 2007 20:22:23 -0700 Subject: [PATCH] Futex: Fix PAGE SIZE assumption Signed-off-by: Christoph Lameter --- kernel/futex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6/kernel/futex.c =================================================================== --- linux-2.6.orig/kernel/futex.c 2008-02-16 20:28:44.000000000 -0800 +++ linux-2.6/kernel/futex.c 2008-02-16 20:49:58.000000000 -0800 @@ -265,7 +265,8 @@ static int get_futex_key(u32 __user *uad err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL); if (err >= 0) { key->shared.pgoff = - page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); + page->index << + (page_cache_page_shift(page) - PAGE_SHIFT); put_page(page); return 0; }