lkml.org 
[lkml]   [2009]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/21] workqueue: fix race condition in schedule_on_each_cpu()
On 11/17/2009 01:04 AM, Frederic Weisbecker wrote:
> On Tue, Nov 17, 2009 at 02:15:06AM +0900, Tejun Heo wrote:
>
>> Commit 65a64464349883891e21e74af16c05d6e1eeb4e9 which allows
>> schedule_on_each_cpu() to be called from keventd added a race
>> condition. schedule_on_each_cpu() may race with cpu hotplug and end
>> up executing the function twice on a cpu.
>>
>> Fix it by moving direct execution into the section protected with
>> get/put_online_cpus(). While at it, update code such that direct
>> execution is done after works have been scheduled for all other cpus
>> and drop unnecessary cpu != orig test from flush loop.
>>
>> Signed-off-by: Tejun Heo<tj@kernel.org>
>> Cc: Andi Kleen<ak@linux.intel.com>
>> Cc: Oleg Nesterov<oleg@redhat.com>
>> ---
>>
>
> Shouldn't this patch go to .32 ?
> This looks like an important fix.
>

Is anything using preeempt notifier on affected architectures?

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.



\
 
 \ /
  Last update: 2009-11-17 08:09    [W:0.486 / U:0.212 seconds]
©2003-2014 Jasper Spaans. Advertise on this site