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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061030180357.GD14055@kernel.dk>
Date:	Mon, 30 Oct 2006 19:03:57 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Arjan van de Ven <arjan@...radead.org>, Mark Lord <liml@....ca>,
	IDE/ATA development list <linux-ide@...r.kernel.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: 2.6.19-rc3-git7: scsi_device_unbusy: inconsistent lock state

On Mon, Oct 30 2006, Ingo Molnar wrote:
> 
> * Jens Axboe <jens.axboe@...cle.com> wrote:
> 
> > > > things may be allocated from that path, so we pass gfp_mask around. I'll
> > > > double check it tonight, but I don't currently see what could be wrong.
> > > > Would lockdep complain about:
> > > > 
> > > >         spin_lock_irqsave(lock, flags);
> > > >         ...
> > > >         spin_unlock_irq(lock);
> > > >         ...
> > > >         spin_lock_irq(lock);
> > > >         ...
> > > >         spin_unlock_irqrestore(lock, flags);
> > > 
> > > this is fine for lockdep IF and only IF there is no "out lock" held
> > > around this that requires irqs to be off. So if you do
> > > 
> > > spin_lock_irqsave(lock1, flags);
> > > ...
> > > spin_lock_irqsave(lock2, flags);
> > > spin_unlock_irq(lock2)
> > > ...
> > > 
> > > then lockdep WILL complain, and rightfully so, about a violation since
> > > lock1 gets violated here ;)
> > 
> > Naturally, that is a bug fair and simple, nothing to do with lockdep.
> 
> well, finding such locking bugs is the main purpose of lockdep, so there 
> is at least some connection i'd say ;-)

Right, I'm totally with you on that one, I wasn't trying to state
otherwise :-)

But we've also had a class of lockdep complaints that simply need some
sort of annotation so that lockdep understands there's nothing wrong
with it.

-- 
Jens Axboe

-
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