@@ -1705,6 +1705,15 @@ static enum oom_status mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t mask, int
if (mem_cgroup_out_of_memory(memcg, mask, order))
return OOM_SUCCESS;
+
+ /*
+ * under rare race the current task might have been selected while
+ * reaching mem_cgroup_out_of_memory and there is no other oom victim
+ * left. There is still no reason to warn because this task will
+ * die and release its bypassed charge eventually.
+ */
+ if (tsk_is_oom_victim(current))
+ return OOM_SUCCESS;
WARN(1,"Memory cgroup charge failed because of no reclaimable memory! "
"This looks like a misconfiguration or a kernel bug.");