Re: [linux-next-20160602] kernel BUG at mm/rmap.c:1253!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/02/2016 03:13 PM, Michal Hocko wrote:
On Thu 02-06-16 13:59:49, Michal Hocko wrote:
[CCing Ebru]

On Thu 02-06-16 13:50:46, Michal Hocko wrote:
[CCing Andrea and Kirill]

Hmm, thinking about it little bit more it might be related to "mm, thp:
make swapin readahead under down_read of mmap_sem". I didn't get to look
closer at the patch but maybe revalidate after mmap sem is dropped is
not sufficient.

so hugepage_vma_revalidate does this:

	hstart = (vma->vm_start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK;
	hend = vma->vm_end & HPAGE_PMD_MASK;
	if (address < hstart || address + HPAGE_PMD_SIZE > hend)
		return SCAN_ADDRESS_RANGE;

I really do not see why we have to play with hstart and hend.

AFAIU the point of these tests is to see whether the vma is large enough to contain the given address within a huge page. And it kind of silently assumes that address is already huge-page aligned.

But
address + HPAGE_PMD_SIZE > hend part looks suspicious. address
always have to vm_start <= address && address < vm_end AFAICS.

I think the check is fine after a deeper look. The code itself is also quite old, the recent patches just abstracted it to the new function.

and the above allows address + HPAGE_PMD_MASK == end.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]