lkml.org 
[lkml]   [2006]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.17-rc5-mm1 - output of lock validator
Ingo Molnar <mingo@elte.hu> wrote:
>
>
> * Andrew Morton <akpm@osdl.org> wrote:
>
> > On Wed, 31 May 2006 16:28:59 +0200
> > Arjan van de Ven <arjan@linux.intel.com> wrote:
> >
> > > --- linux-2.6.17-rc5-mm1.5.orig/drivers/net/8390.c
> > > +++ linux-2.6.17-rc5-mm1.5/drivers/net/8390.c
> > > @@ -299,7 +299,7 @@ static int ei_start_xmit(struct sk_buff
> > >
> > > disable_irq_nosync(dev->irq);
> > >
> > > - spin_lock(&ei_local->page_lock);
> > > + spin_lock_irqsave(&ei_local->page_lock, flags);
> >
> > Again, notabug - we did disable_irq().
> >
> > I think lockdep needs to be taught about this idiom. Perhaps add a
> > new disable_irq_tell_lockdep() which assumes that we're in an
> > equivalent-to-local_irq_disable() state.
>
> agreed. I'll cook up an API for that. The best would be to disable local
> irqs if LOCKDEP is enabled - i.e. how about disable_irq_lockdep() that
> maps to disable_irq() if !LOCKDEP and on LOCKDEP it also disables local
> interrupts? Likewise there would be an enable_irq_lockdep() which would
> re-enable local irqs.
>

That would probably work - we'd have to watch out for people doing
schedule() inside disable_irq_lockdep().


-
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-05-31 23:11    [W:0.054 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site