Messages in this thread | | | Date | Mon, 26 Sep 2011 09:43:22 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [PATCH] memcg: Fix race condition in memcg_check_events() with this_cpu usage |
| |
On Fri, 23 Sep 2011 20:54:42 -0400 Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <srostedt@redhat.com> > > The code in memcg_check_events() calls this_cpu_read() on > different variables without disabling preemption, and can cause > the calculations to be done from two different CPU variables. > > Disable preemption throughout the check to keep apples and oranges > from becoming a mixed drink. > > [ Added this_cpu to __this_cpu conversion by Johannes ] > > Cc: Greg Thelen <gthelen@google.com> > Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > Cc: Balbir Singh <balbir@linux.vnet.ibm.com> > Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Christoph Lameter <cl@linux.com> > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org> > Link: http://lkml.kernel.org/r/20110919212641.015320989@goodmis.org
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Andrew, could you pick this up ?
| |