[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080710104749.GA313@digi.com>
Date: Thu, 10 Jul 2008 12:47:49 +0200
From: Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: Magnus Damm <magnus.damm@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"gregkh@...e.de" <gregkh@...e.de>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"hjk@...utronix.de" <hjk@...utronix.de>,
"lethal@...ux-sh.org" <lethal@...ux-sh.org>,
"tglx@...utronix.de" <tglx@...utronix.de>
Subject: Re: [PATCH] uio: uio_pdrv_genirq V2
Hello Alan,
Alan Cox wrote:
> On Thu, 10 Jul 2008 12:30:36 +0200
> Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com> wrote:
>
> > Alan Cox wrote:
> > >
> > > > > + else if (!irq_on && !priv->irq_disabled)
> > > > > + disable_irq(dev_info->irq);
> > > > I'm not sure if this is a problem on SMP. Should you use
> > > > disable_irq_nosync here, too? Probably it's OK.
> > >
> > > That one will also deadlock.
> > Can you explain why? I think irqcontrol is only called in task context.
> > I only see one possible deadlock and that's disable_irq being called
> > while the irq is IRQ_INPROGRESS on the same cpu. I'm always willing to
> > learn.
>
> CPU0 (UIO IRQ) CPU1 (irqcontrol)
> take IRQ
> take spin lock
> spin on spinlock
> disable_irq (blocks)
Ah, OK, that's because uio_pdrv_genirq_handler and
uio_pdrv_genirq_irqcontrol share the lock.
Is this something that lockdep can detect?
Best regards and thanks for clearifying
Uwe
--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
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