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]
Message-ID: <4E8B07EA.4020307@linux.vnet.ibm.com>
Date:	Tue, 04 Oct 2011 18:49:38 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	"Rafael J. Wysocki" <rjw@...k.pl>, pavel@....cz,
	len.brown@...el.com, mingo@...e.hu, akpm@...ux-foundation.org,
	suresh.b.siddha@...el.com, lucas.demarchi@...fusion.mobi,
	linux-pm@...ts.linux-foundation.org, rusty@...tcorp.com.au,
	vatsa@...ux.vnet.ibm.com, ashok.raj@...el.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] CPU hotplug, freezer: Fix bugs in CPU hotplug call path

On 10/03/2011 03:33 PM, Peter Zijlstra wrote:
> On Mon, 2011-10-03 at 01:14 +0530, Srivatsa S. Bhat wrote:
>> +static atomic_t tasks_frozen = ATOMIC_INIT(0);
>> +
>> +void set_tasks_frozen_flag(void)
>> +{
>> +       atomic_set(&tasks_frozen, 1);
>> +}
>> +
>> +void clear_tasks_frozen_flag(void)
>> +{
>> +       atomic_set(&tasks_frozen, 0);
>> +}
>> +
>> +int tasks_are_frozen(void)
>> +{
>> +       int ret;
>> +       ret = atomic_read(&tasks_frozen);
>> +       return ret;
>> +} 
> 
> What's the point of using atomic_t here? Neither set nor read are
> actually atomic ops.
> 

Hi Peter,
Thank you for the review. I'll send version 2 of the patch with
the changes incorporated.

-- 
Regards,
Srivatsa S. Bhat  <srivatsa.bhat@...ux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab
--
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