Re: [PATCH] mm hugetlb x86: fix hugepage memory leak in mincore()

From: Andrew Morton
Date: Tue Dec 08 2009 - 17:36:06 EST


On Mon, 07 Dec 2009 16:59:14 +0900
Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> wrote:

> Most callers of pmd_none_or_clear_bad() check whether the target
> page is in a hugepage or not, but mincore() and walk_page_range()
> do not check it. So if we use mincore() on a hugepage on x86 machine,
> the hugepage memory is leaked as shown below.
> This patch fixes it by extending mincore() system call to support hugepages.

This bug is fairly embarrassing. I tagged the patch for a -stable
backport.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/