Re: [patch] MAP_HUGETLB munmap fails with size not 2MB aligned

2014-10-21 Thread Davide Libenzi
On Tue, 21 Oct 2014, Davide Libenzi wrote: > Calling mmap with MAP_HUGETLB and a size which is not 2MB aligned, causes > mmap to fail. Tested on 3.13.x but tracking back to 3.2.x. A couple of "un" were found under my desk, as it's clearly munmap which is failing. - Davide -- To unsubscribe

[patch] MAP_HUGETLB munmap fails with size not 2MB aligned

2014-10-21 Thread Davide Libenzi
Calling mmap with MAP_HUGETLB and a size which is not 2MB aligned, causes mmap to fail. Tested on 3.13.x but tracking back to 3.2.x. In do_munmap() we forcibly want a 4KB default page, and we wrongly calculate the end of the map, by doing a split right in the middle of a huge page, which will

[patch] MAP_HUGETLB munmap fails with size not 2MB aligned

2014-10-21 Thread Davide Libenzi
Calling mmap with MAP_HUGETLB and a size which is not 2MB aligned, causes mmap to fail. Tested on 3.13.x but tracking back to 3.2.x. In do_munmap() we forcibly want a 4KB default page, and we wrongly calculate the end of the map, by doing a split right in the middle of a huge page, which will

Re: [patch] MAP_HUGETLB munmap fails with size not 2MB aligned

2014-10-21 Thread Davide Libenzi
On Tue, 21 Oct 2014, Davide Libenzi wrote: Calling mmap with MAP_HUGETLB and a size which is not 2MB aligned, causes mmap to fail. Tested on 3.13.x but tracking back to 3.2.x. A couple of un were found under my desk, as it's clearly munmap which is failing. - Davide -- To unsubscribe