aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorMichal Hocko <[email protected]>2013-07-31 13:53:51 -0700
committerLinus Torvalds <[email protected]>2013-07-31 14:41:04 -0700
commit33cb876e947b9ddda8dca3fb99234b743a597ef9 (patch)
tree334a94157e6fd53ef9bb88771b181c6cbfa4826a /tools/perf/util/scripting-engines/trace-event-python.c
parent8e0ed445b3478468372449859c45c6b3032acf2f (diff)
vmpressure: make sure there are no events queued after memcg is offlined
vmpressure is called synchronously from reclaim where the target_memcg is guaranteed to be alive but the eventfd is signaled from the work queue context. This means that memcg (along with vmpressure structure which is embedded into it) might go away while the work item is pending which would result in use-after-release bug. We have two possible ways how to fix this. Either vmpressure pins memcg before it schedules vmpr->work and unpin it in vmpressure_work_fn or explicitely flush the work item from the css_offline context (as suggested by Tejun). This patch implements the later one and it introduces vmpressure_cleanup which flushes the vmpressure work queue item item. It hooks into mem_cgroup_css_offline after the memcg itself is cleaned up. [[email protected]: coding-style fixes] Signed-off-by: Michal Hocko <[email protected]> Reported-by: Tejun Heo <[email protected]> Cc: Anton Vorontsov <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Li Zefan <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions