The patch titled nommu: ramfs: don't leak pages when adding to page cache fails has been removed from the -mm tree. Its filename was nommu-ramfs-dont-leak-pages-when-adding-to-page-cache-fails.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: nommu: ramfs: don't leak pages when adding to page cache fails From: Johannes Weiner <hannes@xxxxxxxxxxx> When a ramfs nommu mapping is expanded, contiguous pages are allocated and added to the pagecache. The caller's reference is then passed on by moving whole pagevecs to the file lru list. If the page cache adding fails, make sure that the error path also moves the pagevec contents which might still contain up to PAGEVEC_SIZE successfully added pages, of which we would leak references otherwise. Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Enrik Berkhan <Enrik.Berkhan@xxxxxx> Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ramfs/file-nommu.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/ramfs/file-nommu.c~nommu-ramfs-dont-leak-pages-when-adding-to-page-cache-fails fs/ramfs/file-nommu.c --- a/fs/ramfs/file-nommu.c~nommu-ramfs-dont-leak-pages-when-adding-to-page-cache-fails +++ a/fs/ramfs/file-nommu.c @@ -129,6 +129,7 @@ int ramfs_nommu_expand_for_mapping(struc return -EFBIG; add_error: + pagevec_lru_add_file(&lru_pvec); page_cache_release(pages + loop); for (loop++; loop < npages; loop++) __free_page(pages + loop); _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are origin.patch linux-next.patch cifs-use-kzfree.patch s390-use-kzfree.patch crypto-use-kzfree.patch vmscan-rename-scmay_swap-to-may_unmap.patch mm-introduce-for_each_populated_zone-macro.patch mm-introduce-for_each_populated_zone-macro-cleanup.patch mm-shrink_all_memory-use-scnr_reclaimed.patch mm-shrink_all_memory-use-scnr_reclaimed-checkpatch-fixes.patch vmscan-clip-swap_cluster_max-in-shrink_all_memory.patch vmscan-respect-higher-order-in-zone_reclaim.patch mm-move-pagevec-stripping-to-save-unlock-relock.patch mm-dont-free-swap-slots-on-page-deactivation.patch mm-remove-pagevec_swap_free.patch nommu-there-is-no-mlock-for-nommu-so-dont-provide-the-bits.patch nommu-make-config_unevictable_lru-available-when-config_mmu=n.patch ecryptfs-use-kzfree.patch memcg-remove-mem_cgroup_calc_mapped_ratio-take2.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