Subject: [merged] mm-memcg-do-not-declare-oom-from-__gfp_nofail-allocations.patch removed from -mm tree To: hannes@xxxxxxxxxxx,mhocko@xxxxxxx,rientjes@xxxxxxxxxx,stable@xxxxxxxxxxxxxxx,wdauchy@xxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 16 Dec 2013 12:39:22 -0800 The patch titled Subject: mm: memcg: do not declare OOM from __GFP_NOFAIL allocations has been removed from the -mm tree. Its filename was mm-memcg-do-not-declare-oom-from-__gfp_nofail-allocations.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Johannes Weiner <hannes@xxxxxxxxxxx> Subject: mm: memcg: do not declare OOM from __GFP_NOFAIL allocations 84235de394d9 ("fs: buffer: move allocation failure loop into the allocator") started recognizing __GFP_NOFAIL in memory cgroups but forgot to disable the OOM killer. Any task that does not fail allocation will also not enter the OOM completion path. So don't declare an OOM state in this case or it'll be leaked and the task be able to bypass the limit until the next userspace-triggered page fault cleans up the OOM state. Reported-by: William Dauchy <wdauchy@xxxxxxxxx> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> [3.12.x] Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/memcontrol.c~mm-memcg-do-not-declare-oom-from-__gfp_nofail-allocations mm/memcontrol.c --- a/mm/memcontrol.c~mm-memcg-do-not-declare-oom-from-__gfp_nofail-allocations +++ a/mm/memcontrol.c @@ -2696,6 +2696,9 @@ static int __mem_cgroup_try_charge(struc if (unlikely(task_in_memcg_oom(current))) goto bypass; + if (gfp_mask & __GFP_NOFAIL) + oom = false; + /* * We always charge the cgroup the mm_struct belongs to. * The mm_struct's mem_cgroup changes on task migration if the _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are mm-page_alloc-exclude-unreclaimable-allocations-from-zone-fairness-policy.patch mm-memcg-avoid-oom-notification-when-current-needs-access-to-memory-reserves.patch proc-meminfo-provide-estimated-available-memory.patch mm-mempolicy-remove-unneeded-functions-for-uma-configs.patch memcg-fix-kmem_account_flags-check-in-memcg_can_account_kmem.patch memcg-make-memcg_update_cache_sizes-static.patch mm-memblock-debug-correct-displaying-of-upper-memory-boundary.patch mm-memblock-debug-dont-free-reserved-array-if-arch_discard_memblock.patch mm-bootmem-remove-duplicated-declaration-of-__free_pages_bootmem.patch mm-memblock-remove-unnecessary-inclusions-of-bootmemh.patch mm-memblock-drop-warn-and-use-smp_cache_bytes-as-a-default-alignment.patch mm-memblock-reorder-parameters-of-memblock_find_in_range_node.patch mm-memblock-switch-to-use-numa_no_node-instead-of-max_numnodes.patch mm-memblock-add-memblock-memory-allocation-apis.patch mm-memblock-add-memblock-memory-allocation-apis-fix.patch mm-init-use-memblock-apis-for-early-memory-allocations.patch mm-printk-use-memblock-apis-for-early-memory-allocations.patch mm-page_alloc-use-memblock-apis-for-early-memory-allocations.patch mm-power-use-memblock-apis-for-early-memory-allocations.patch lib-swiotlbc-use-memblock-apis-for-early-memory-allocations.patch lib-cpumaskc-use-memblock-apis-for-early-memory-allocations.patch mm-sparse-use-memblock-apis-for-early-memory-allocations.patch mm-hugetlb-use-memblock-apis-for-early-memory-allocations.patch mm-page_cgroup-use-memblock-apis-for-early-memory-allocations.patch mm-percpu-use-memblock-apis-for-early-memory-allocations.patch mm-memory_hotplug-use-memblock-apis-for-early-memory-allocations.patch drivers-firmware-memmapc-use-memblock-apis-for-early-memory-allocations.patch arch-arm-kernel-use-memblock-apis-for-early-memory-allocations.patch arch-arm-mm-initc-use-memblock-apis-for-early-memory-allocations.patch arch-arm-mach-omap2-omap_hwmodc-use-memblock-apis-for-early-memory-allocations.patch memcg-oom-lock-mem_cgroup_print_oom_info.patch swap-add-a-simple-detector-for-inappropriate-swapin-readahead-fix.patch linux-next.patch debugging-keep-track-of-page-owners.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html