THP is properly handled in munlock_vma_pages_range(). It fixes crashes like this: http://lkml.kernel.org/r/565C5C38.3040705@xxxxxxxxxx Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> --- mm/mlock.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/mlock.c b/mm/mlock.c index af421d8bd6da..9197b6721a1e 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -393,6 +393,13 @@ static unsigned long __munlock_pagevec_fill(struct pagevec *pvec, if (!page || page_zone_id(page) != zoneid) break; + /* + * Do not use pagevec for PTE-mapped THP, + * munlock_vma_pages_range() will handle them. + */ + if (PageTransCompound(page)) + break; + get_page(page); /* * Increase the address that will be returned *before* the -- 2.6.4 -- 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>