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:	Tue, 28 May 2013 12:26:12 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Sasha Levin <sasha.levin@...cle.com>
cc:	Ingo Molnar <mingo@...e.hu>,
	"Liu, Chuansheng" <chuansheng.liu@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"Wu, Fengguang" <fengguang.wu@...el.com>,
	"eag0628@...il.com" <eag0628@...il.com>,
	Dave Jones <davej@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	John Stultz <johnstul@...ibm.com>
Subject: Re: WARNING: at kernel/smp.c:385 smp_call_function_many

On Thu, 16 May 2013, Sasha Levin wrote:
> On 04/18/2013 08:29 PM, Sasha Levin wrote:
> > Hi Liu,
> > 
> > On 04/18/2013 08:10 PM, Liu, Chuansheng wrote:
> >>> It seems that with commit "smp: Give WARN()ing when calling
> >>>> smp_call_function_many()/single() in serving irq" I'm getting a bunch of these:
> >> This patch gives the warning even when the smp_call_function_many() is called in softirq context,
> >> because it will bring the possible deadlock cases, the example is below:
> >> CPUA                            CPUB
> >>                                 spin_lock(&spinlock)
> >>                                 Any irq coming, call the irq handler
> >>                                 irq_exit()
> >> spin_lock_irq(&spinlock)
> >> <== Blocking here due to
> >> CPUB hold it
> >>                                   __do_softirq()
> >>                                     run_timer_softirq()
> >>                                       timer_cb()
> >>                                         call smp_call_function_many()
> >>                                           send IPI interrupt to CPUA
> >>                                             wait_csd()
> >>
> >> Then both CPUA and CPUB will be deadlocked here.
> > 
> > Right.

Well, that's only true if LOCKDEP is enabled. The !LOCKDEP case
reenables interrupts if the lock is contended.

> > So commit f55a6faa3 ("hrtimer: Provide clock_was_set_delayed()") followed by one
> > of the commits that used clock_was_set_delayed() may trigger the deadlock you've
> > described. (cc John Stultz...)

I'll have a look. It's non trivial to fix :(

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