* [merged] mm-fix-mem_cgroup_oom_disable-call-missing.patch removed from -mm tree
@ 2017-09-11 19:40 ` akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2017-09-11 19:40 UTC (permalink / raw)
To: kirill, ldufour, mhocko, mm-commits, stable
The patch titled
Subject: mm/memory.c: fix mem_cgroup_oom_disable() call missing
has been removed from the -mm tree. Its filename was
mm-fix-mem_cgroup_oom_disable-call-missing.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Subject: mm/memory.c: fix mem_cgroup_oom_disable() call missing
Seen while reading the code, in handle_mm_fault(), in the case
arch_vma_access_permitted() is failing the call to
mem_cgroup_oom_disable() is not made.
To fix that, move the call to mem_cgroup_oom_enable() after calling
arch_vma_access_permitted() as it should not have entered the memcg OOM.
Link: http://lkml.kernel.org/r/1504625439-31313-1-git-send-email-ldufour@linux.vnet.ibm.com
Fixes: bae473a423f6 ("mm: introduce fault_env")
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff -puN mm/memory.c~mm-fix-mem_cgroup_oom_disable-call-missing mm/memory.c
--- a/mm/memory.c~mm-fix-mem_cgroup_oom_disable-call-missing
+++ a/mm/memory.c
@@ -4053,6 +4053,11 @@ int handle_mm_fault(struct vm_area_struc
/* do counter updates before entering really critical section. */
check_sync_rss_stat(current);
+ if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
+ flags & FAULT_FLAG_INSTRUCTION,
+ flags & FAULT_FLAG_REMOTE))
+ return VM_FAULT_SIGSEGV;
+
/*
* Enable the memcg OOM handling for faults triggered in user
* space. Kernel faults are handled more gracefully.
@@ -4060,11 +4065,6 @@ int handle_mm_fault(struct vm_area_struc
if (flags & FAULT_FLAG_USER)
mem_cgroup_oom_enable();
- if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
- flags & FAULT_FLAG_INSTRUCTION,
- flags & FAULT_FLAG_REMOTE))
- return VM_FAULT_SIGSEGV;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [merged] mm-fix-mem_cgroup_oom_disable-call-missing.patch removed from -mm tree
@ 2017-09-11 19:40 ` akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2017-09-11 19:40 UTC (permalink / raw)
To: kirill, ldufour, mhocko, mm-commits, stable
The patch titled
Subject: mm/memory.c: fix mem_cgroup_oom_disable() call missing
has been removed from the -mm tree. Its filename was
mm-fix-mem_cgroup_oom_disable-call-missing.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Subject: mm/memory.c: fix mem_cgroup_oom_disable() call missing
Seen while reading the code, in handle_mm_fault(), in the case
arch_vma_access_permitted() is failing the call to
mem_cgroup_oom_disable() is not made.
To fix that, move the call to mem_cgroup_oom_enable() after calling
arch_vma_access_permitted() as it should not have entered the memcg OOM.
Link: http://lkml.kernel.org/r/1504625439-31313-1-git-send-email-ldufour@linux.vnet.ibm.com
Fixes: bae473a423f6 ("mm: introduce fault_env")
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff -puN mm/memory.c~mm-fix-mem_cgroup_oom_disable-call-missing mm/memory.c
--- a/mm/memory.c~mm-fix-mem_cgroup_oom_disable-call-missing
+++ a/mm/memory.c
@@ -4053,6 +4053,11 @@ int handle_mm_fault(struct vm_area_struc
/* do counter updates before entering really critical section. */
check_sync_rss_stat(current);
+ if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
+ flags & FAULT_FLAG_INSTRUCTION,
+ flags & FAULT_FLAG_REMOTE))
+ return VM_FAULT_SIGSEGV;
+
/*
* Enable the memcg OOM handling for faults triggered in user
* space. Kernel faults are handled more gracefully.
@@ -4060,11 +4065,6 @@ int handle_mm_fault(struct vm_area_struc
if (flags & FAULT_FLAG_USER)
mem_cgroup_oom_enable();
- if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
- flags & FAULT_FLAG_INSTRUCTION,
- flags & FAULT_FLAG_REMOTE))
- return VM_FAULT_SIGSEGV;
-
if (unlikely(is_vm_hugetlb_page(vma)))
ret = hugetlb_fault(vma->vm_mm, vma, address, flags);
else
_
Patches currently in -mm which might be from ldufour@linux.vnet.ibm.com are
mm-skip-hwpoisoned-pages-when-onlining-pages.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-11 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-11 19:40 [merged] mm-fix-mem_cgroup_oom_disable-call-missing.patch removed from -mm tree akpm
2017-09-11 19:40 ` akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.