On Wed, Apr 12, 2017 at 10:07:28PM +0200, Thomas Gleixner wrote: > work_on_cpu() is not protected against CPU hotplug. For code which requires > to be either executed on an online CPU or to fail if the CPU is not > available the callsite would have to protect against CPU hotplug. > > Provide a function which does get/put_online_cpus() around the call to > work_on_cpu() and fails the call with -ENODEV if the target CPU is not > online. > > Preparatory patch to convert several racy task affinity manipulations. > > Signed-off-by: Thomas Gleixner <t...@linutronix.de> > Cc: Tejun Heo <t...@kernel.org> > Cc: Lai Jiangshan <jiangshan...@gmail.com>
Acked-by: Tejun Heo <t...@kernel.org> Thanks. -- tejun