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 Sep 2010 07:26:45 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] pkt_sched: Fix lockdep warning on est_tree_lock in
 gen_estimator

Le jeudi 02 septembre 2010 à 22:55 +0200, Jarek Poplawski a écrit :
> On Thu, Sep 02, 2010 at 10:32:01PM +0200, Eric Dumazet wrote:
> > Le jeudi 02 septembre 2010 ?? 13:22 -0700, David Miller a écrit :
> > > From: Jarek Poplawski <jarkao2@...il.com>
> > > Date: Thu, 2 Sep 2010 22:12:58 +0200
> > > 
> > > > This patch fixes a lockdep warning:
> > > > 
> > > > [  516.287584] =========================================================
> > > > [  516.288386] [ INFO: possible irq lock inversion dependency detected ]
> > > > [  516.288386] 2.6.35b #7
> > > > [  516.288386] ---------------------------------------------------------
> > > > [  516.288386] swapper/0 just changed the state of lock:
> > > > [  516.288386]  (&qdisc_tx_lock){+.-...}, at: [<c12eacda>] est_timer+0x62/0x1b4
> > > > [  516.288386] but this lock took another, SOFTIRQ-unsafe lock in the past:
> > > > [  516.288386]  (est_tree_lock){+.+...}
> > > > [  516.288386] 
> > > > [  516.288386] and interrupts could create inverse lock ordering between them.
> > > > ...
> > > > 
> > > > So, est_tree_lock needs BH protection because it's taken by
> > > > qdisc_tx_lock, which is used both in BH and process contexts.
> > > > (Full warning with this patch at netdev, 02 Sep 2010.)
> > > > 
> > > > Fixes commit: ae638c47dc040b8def16d05dc6acdd527628f231
> > > > 
> > > > Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
> > > 
> > > Applied, thanks Jarek.
> > > 
> > > Eric, please make an effort to run with lockdep enabled when making
> > > locking changes, just for fun :-)
> > 
> > Hmm... I still trying to understand the problem.
> > 
> > I dont understand Jarek analysis yet.
> > 
> 
> cpu1:					cpu2:
> (process)				(process)
> qdisc_tx_lock				est_tree_lock
> (waiting for est_tree_lock)		(bh)
> 					(waiting for qdisc_tx_lock)
> 

Cool. Reading commit ae638c47dc040b, I thought only RTNL was possibly
hold in these paths.

Thanks Jarek !



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ