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] [day] [month] [year] [list]
Date:   Fri, 03 Aug 2018 11:57:23 -0700
From:   Sodagudi Prasad <psodagud@...eaurora.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Peter Zijlstra <peterz@...radead.org>, mingo@...nel.org,
        gregkh@...uxfoundation.org, bigeasy@...utronix.de,
        isaacm@...eaurora.org, linux-kernel@...r.kernel.org
Subject: Re: cpu stopper threads and setaffinity leads to deadlock

On 2018-08-03 04:41, Thomas Gleixner wrote:
> Prasad.
> 
> On Thu, 2 Aug 2018, Peter Zijlstra wrote:
>> 
>> So why didn't you do the 'obvious' parallel to what you did for
>> cpu_stop_queue_two_works(), namely:
> 
> Is that patch fixing the issue for you?
<Prasad> Hi Thomas and Peter,

Yes. Tested both versions of patches and both variants are working on 
Qualcomm devices
with stress testing of set affinity and tasks cross-migration, which 
were previously leading to the deadlock.

-Thanks, Prasad
> 
>> --- a/kernel/stop_machine.c
>> +++ b/kernel/stop_machine.c
>> @@ -81,6 +81,7 @@ static bool cpu_stop_queue_work(unsigned
>>  	unsigned long flags;
>>  	bool enabled;
>> 
>> +	preempt_disable();
>>  	raw_spin_lock_irqsave(&stopper->lock, flags);
>>  	enabled = stopper->enabled;
>>  	if (enabled)
>> @@ -90,6 +91,7 @@ static bool cpu_stop_queue_work(unsigned
>>  	raw_spin_unlock_irqrestore(&stopper->lock, flags);
>> 
>>  	wake_up_q(&wakeq);
>> +	preempt_enable();
>> 
>>  	return enabled;
>>  }
>> 

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
Forum,
Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ