lkml.org 
[lkml]   [2006]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.19-rc3-git7: scsi_device_unbusy: inconsistent lock state

* Jens Axboe <jens.axboe@oracle.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 ;-)

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-30 18:57    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site