Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751925AbdDNEST (ORCPT ); Fri, 14 Apr 2017 00:18:19 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35578 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbdDNESR (ORCPT ); Fri, 14 Apr 2017 00:18:17 -0400 Date: Fri, 14 Apr 2017 13:18:03 +0900 From: Tejun Heo To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Ingo Molnar , Sebastian Siewior , Benjamin Herrenschmidt , "David S. Miller" , Fenghua Yu , Herbert Xu , Lai Jiangshan , Len Brown , Michael Ellerman , "Rafael J. Wysocki" , Tony Luck , Viresh Kumar Subject: Re: [patch 02/13] workqueue: Provide work_on_cpu_safe() Message-ID: <20170414041803.GA13899@wtj.duckdns.org> References: <20170412200726.941336635@linutronix.de> <20170412201042.262610721@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170412201042.262610721@linutronix.de> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 707 Lines: 21 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 > Cc: Tejun Heo > Cc: Lai Jiangshan Acked-by: Tejun Heo Thanks. -- tejun