Re: [lockdep warning] INFO: inconsistent lock state,serial8250_interrupt(), &port_lock_key

From: Ingo Molnar
Date: Thu Jul 24 2008 - 05:42:19 EST



* Borislav Petkov <petkovbb@xxxxxxxxxxxxxx> wrote:

> On Thu, Jul 24, 2008 at 08:53:29AM +0200, Borislav Petkov wrote:
> > On Wed, Jul 23, 2008 at 11:36:04AM +0200, Ingo Molnar wrote:
> > >
> > > * Ingo Molnar <mingo@xxxxxxx> wrote:
> > >
> > > > =================================
> > > > [ INFO: inconsistent lock state ]
> > > > 2.6.26-tip-06509-gb4ebc67-dirty #13600
> > > > ---------------------------------
> > >
> > > the upstream component of that is: v2.6.26-6077-gc010b2f
> > >
> > > i.e. my suspicion is that this got introduced via the recent tty
> > > changes.
> >
> > Hi,
> >
> > i hit the same warning here. How about the following fix (this is at least what
> > i think happens):
> > --
> >
> > serial8250_startup() might unconditionally enable irqs after releasing
> > &up->port.lock while we're still servicing an interrupt.
>
> Actually, this explanation is not correct - it should be more like:
>
> serial8250_startup() doesn't disable interrupts while taking the
> &up->port.lock which might race against the interrupt handler
> serial8250_interrupt(), which when entered, will deadlock waiting for
> the lock to be released.

thanks Borislav, your patch seems to have done the trick.

Tested-by: Ingo Molnar <mingo@xxxxxxx>

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