[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHH2K0Z_MsVceOjoFwT=qORSsKrFWjs_V602NMtPBysasJLEww@mail.gmail.com>
Date: Fri, 23 Sep 2011 19:34:23 -0700
From: Greg Thelen <gthelen@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
PeterZijlstra <peterz@...radead.org>,
ChristophLameter <cl@...ux.com>
Subject: Re: [PATCH] memcg: Fix race condition in memcg_check_events() with
this_cpu usage
On Fri, Sep 23, 2011 at 5:54 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> From: Steven Rostedt <srostedt@...hat.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@...gle.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> Cc: Balbir Singh <balbir@...ux.vnet.ibm.com>
> Cc: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Christoph Lameter <cl@...ux.com>
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> Link: http://lkml.kernel.org/r/20110919212641.015320989@goodmis.org
Looks good to me. Thanks.
Reviewed-by: Greg Thelen <gthelen@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists