The patch titled Subject: mm: cma: WARN if freed memory is still in use has been removed from the -mm tree. Its filename was mm-cma-warn-if-freed-memory-is-still-in-use.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Subject: mm: cma: WARN if freed memory is still in use Memory returned to free_contig_range() must have no other references. Let kernel to complain loudly if page reference count is not equal to 1. [rientjes@xxxxxxxxxx: support sparsemem] Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Reviewed-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx> Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff -puN mm/page_alloc.c~mm-cma-warn-if-freed-memory-is-still-in-use mm/page_alloc.c --- a/mm/page_alloc.c~mm-cma-warn-if-freed-memory-is-still-in-use +++ a/mm/page_alloc.c @@ -5978,8 +5978,15 @@ done: void free_contig_range(unsigned long pfn, unsigned nr_pages) { - for (; nr_pages--; ++pfn) - __free_page(pfn_to_page(pfn)); + unsigned int count = 0; + + for (; nr_pages--; pfn++) { + struct page *page = pfn_to_page(pfn); + + count += page_count(page) != 1; + __free_page(page); + } + WARN(count != 0, "%d pages are still in use!\n", count); } #endif _ Patches currently in -mm which might be from m.szyprowski@xxxxxxxxxxx are origin.patch linux-next.patch mm-fix-zone_watermark_ok_safe-accounting-of-isolated-pages.patch cma-make-putback_lru_pages-call-conditional.patch cma-make-putback_lru_pages-call-conditional-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html