diff options
author | 2011-11-02 13:38:33 -0700 | |
---|---|---|
committer | 2011-11-02 16:07:00 -0700 | |
commit | 4799401fef9d5951b2da384c5eb08034c48e08a0 (patch) | |
tree | 94f9113c6870f46811aaa0f08cdb3ca2beba1e9c /fs/proc/proc_sysctl.c | |
parent | memcg: close race between charge and putback (diff) | |
download | linux-dev-4799401fef9d5951b2da384c5eb08034c48e08a0.tar.xz linux-dev-4799401fef9d5951b2da384c5eb08034c48e08a0.zip |
memcg: Fix race condition in memcg_check_events() with this_cpu usage
Various code in memcontrol.c () calls this_cpu_read() on the calculations
to be done from two different percpu variables, or does an open-coded
read-modify-write on a single percpu variable.
Disable preemption throughout these operations so that the writes go to
the correct palces.
[hannes@cmpxchg.org: added this_cpu to __this_cpu conversion]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
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: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/proc_sysctl.c')
0 files changed, 0 insertions, 0 deletions