lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 May 2014 17:56:10 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	<jjherne@...ux.vnet.ibm.com>, Sasha Levin <sasha.levin@...cle.com>,
	Tejun Heo <tj@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	Dave Jones <davej@...hat.com>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: workqueue: WARN at at kernel/workqueue.c:2176

On 05/16/2014 05:35 PM, Peter Zijlstra wrote:
> On Fri, May 16, 2014 at 11:50:42AM +0800, Lai Jiangshan wrote:
>> After debugging, I found the hotlug-in cpu is atctive but !online in this case.
>> the problem was introduced by 5fbd036b.
>> Some code assumes that any cpu in cpu_active_mask is also online, but 5fbd036b breaks
>> this assumption, so the corresponding code with this assumption should be changed too.
> 
> Good find, and yes it does that.
> 
>> The following patch is just a workaround. After it is applied, the above WARNING
>> is gone, but I can't hit the wq problem that you found.
> 
> Seeing how the entirety of hotplug is basically duct tape and twigs, the
> below isn't that bad.

I think we need to find a more grace solution...

> 
>> ---
>> diff --git a/kernel/cpu.c b/kernel/cpu.c
>> index a9e710e..253a129 100644
>> --- a/kernel/cpu.c
>> +++ b/kernel/cpu.c
>> @@ -726,9 +726,10 @@ void set_cpu_present(unsigned int cpu, bool present)
>>  
>>  void set_cpu_online(unsigned int cpu, bool online)
>>  {
>> -	if (online)
>> +	if (online) {
>>  		cpumask_set_cpu(cpu, to_cpumask(cpu_online_bits));
>> -	else
>> +		cpumask_set_cpu(cpu, to_cpumask(cpu_active_bits));
>> +	} else
>>  		cpumask_clear_cpu(cpu, to_cpumask(cpu_online_bits));
>>  }
>>  
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index 268a45e..c1a712d 100644
>> --- a/kernel/sched/core.c
>> +++ b/kernel/sched/core.c
>> @@ -5043,7 +5043,6 @@ static int sched_cpu_active(struct notifier_block *nfb,
>>  				      unsigned long action, void *hcpu)
>>  {
>>  	switch (action & ~CPU_TASKS_FROZEN) {
>> -	case CPU_STARTING:
>>  	case CPU_DOWN_FAILED:
>>  		set_cpu_active((long)hcpu, true);
>>  		return NOTIFY_OK;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ