Re: [PATCH 17/63] edac_mce: Add an interface driver to report mceerrors via edac

From: Mauro Carvalho Chehab
Date: Fri Sep 25 2009 - 10:55:42 EST


Em Fri, 25 Sep 2009 14:47:20 +0200
Arjan van de Ven <arjan@xxxxxxxxxxxxx> escreveu:

> On Fri, 25 Sep 2009 09:11:30 -0300
> Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> wrote:
>
> > 5) there are very few calls to kernel routines here:
> > list_for_each_entry(), spin_lock_irqsave(), in_unlock_irqrestore(),
> > memcpy(). I don't think any of them will have any problems on working
> > even inside NMI context.
>
> spinlocks in NMI context don't do what you think they do....
> _irqsave does not disable NMIs so this can deadlock.
>
> You likely want to use trylock here....

I see. I'll rewrite that part of the code using trylock or RCU.

--

Cheers,
Mauro
--
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/