android_kernel_motorola_sm6375/fs/hugetlbfs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mike Kravetz 5df63c2a14 hugetlbfs: fix bug in pgoff overflow checking
This is a fix for a regression in 32 bit kernels caused by an invalid
check for pgoff overflow in hugetlbfs mmap setup.  The check incorrectly
specified that the size of a loff_t was the same as the size of a long.
The regression prevents mapping hugetlbfs files at offsets greater than
4GB on 32 bit kernels.

On 32 bit kernels conversion from a page based unsigned long can not
overflow a loff_t byte offset.  Therefore, skip this check if
sizeof(unsigned long) != sizeof(loff_t).

Link: http://lkml.kernel.org/r/[email protected]
Fixes: 63489f8e82 ("hugetlbfs: check for pgoff value overflow")
Reported-by: Dan Rue <[email protected]>
Signed-off-by: Mike Kravetz <[email protected]>
Tested-by: Anders Roxell <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Yisheng Xie <[email protected]>
Cc: "Kirill A . Shutemov" <[email protected]>
Cc: Nic Losby <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2018-04-05 21:36:21 -07:00
..
inode.c hugetlbfs: fix bug in pgoff overflow checking 2018-04-05 21:36:21 -07:00
Makefile