]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Avoid race between cpu hotplug and installing event
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 15 Jun 2012 06:31:31 +0000 (14:31 +0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 18 Jun 2012 10:13:20 +0000 (12:13 +0200)
commite6768e1c42ec41a03a3d86a078146ce6fbf8474b
tree54883756f1b404f2232d4d5077219ea98c1fdbfd
parent153a17edae4c53511c6fb6f5bce62cf73a8359fc
perf: Avoid race between cpu hotplug and installing event

perf_event_open() requires the cpu on which to install event is online,
but the cpu can go offline after perf_event_open checks that. Add a
get_online_cpus()/put_online_cpus() pair to avoid the race.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1339741902-8449-3-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c