Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages
commit 7c8d42f upstream. The alignment check in prepare_hugepage_range() is wrong for 2 GB hugepages, it only checks for 1 MB hugepage alignment. This can result in kernel crash in __unmap_hugepage_range() at the BUG_ON(start & ~huge_page_mask(h)) alignment check, for mappings created with MAP_FIXED at unaligned address. Fix this by correctly handling multiple hugepage sizes, similar to the generic version of prepare_hugepage_range(). Fixes: d08de8e ("s390/mm: add support for 2GB hugepages") Cc: <[email protected]> # 4.8+ Acked-by: Alexander Gordeev <[email protected]> Signed-off-by: Gerald Schaefer <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information