Home
last modified time | relevance | path

Searched hist:"2 b37c35e" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/hugetlbfs/
H A Dinode.c2b37c35e Mon Jul 25 19:11:49 CDT 2011 Becky Bruce <beckyb@kernel.crashing.org> fs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bit

This:

vma->vm_pgoff & ~(huge_page_mask(h) >> PAGE_SHIFT)

is incorrect on 32-bit. It causes us to & the pgoff with something that
looks like this (for a 4m hugepage): 0xfff003ff. The mask should be
flipped and *then* shifted, to give you 0x0000_03fff.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2b37c35e Mon Jul 25 19:11:49 CDT 2011 Becky Bruce <beckyb@kernel.crashing.org> fs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bit

This:

vma->vm_pgoff & ~(huge_page_mask(h) >> PAGE_SHIFT)

is incorrect on 32-bit. It causes us to & the pgoff with something that
looks like this (for a 4m hugepage): 0xfff003ff. The mask should be
flipped and *then* shifted, to give you 0x0000_03fff.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>