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:	Sun, 07 Jul 2013 21:59:06 +0530
From:	Preeti U Murthy <preeti@...ux.vnet.ibm.com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	Wang YanQing <udknight@...il.com>, xiaoguangrong@...fujitsu.com,
	mingo@...e.hu, paulmck@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	npiggin@...e.de, deepthi@...ux.vnet.ibm.com, peterz@...radead.org,
	rusty@...tcorp.com.au, heiko.carstens@...ibm.com,
	rostedt@...dmis.org, miltonm@....com,
	srivatsa.bhat@...ux.vnet.ibm.com, jens.axboe@...cle.com,
	tj@...nel.org, akpm@...ux-foundation.org,
	svaidy@...ux.vnet.ibm.com, shli@...nel.org,
	lig.fnst@...fujitsu.com, anton@...ba.org
Subject: Re: [PATCH 2/3] smp/ipi:Clarify ambiguous comments around deadlock
 scenarios in smp_call_function variants.

Thanks for the pointer Thomas :)

Regards
Preeti U murthy
On 07/07/2013 01:18 AM, Thomas Gleixner wrote:
> On Sat, 6 Jul 2013, Preeti U Murthy wrote:
> 
>> Hi Wang,
>>
>> On 07/06/2013 11:42 AM, Wang YanQing wrote:
>>> On Fri, Jul 05, 2013 at 09:57:11PM +0530, Preeti U Murthy wrote:
>>>> Elaborate on when deadlocks can occur when a call is made to
>>>> smp_call_function_single() and its friends. This avoids ambiguity about
>>>> when to use these calls.
>>>>
>>>> +	 * 2. wait = 0: This function could be called from an interrupt
>>>> +	 * context, and can get blocked on the csd_lock(csd) below in
>>>> +	 * "non wait cases".
>>>> +	 * This is because the percpu copy of csd of this_cpu is used
>>>> +	 * in non wait cases. Under such circumstances, if the previous caller
>>>> +	 * of this function who got preempted by this interrupt has already taken
>>>> +	 * the lock under non wait condition, it will result in deadlock.
>>>> +	 *
>>>
>>> No, it will not cause deadlock, it is not mutex lock,  it is busy wait, so
>>> when the CSD_FLAG_LOCK be cleared, the code will go on running.
>>
>> A deadlock might not result, but a potential long wait in an interrupt
>> context could result if the source cpu got preempted by an interrupt
>> between  csd_lock(csd) and generic_exec_single(), where it actually
>> sends an ipi to the target cpu.
> 
> See https://lkml.org/lkml/2013/7/5/183 and the related thread for real
> deadlock scenarios.
> 
> Thanks,
> 
> 	tglx
> 

--
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