Re: [PATCH/RFC] I/O-check interface for driver's error handling

From: Benjamin Herrenschmidt
Date: Wed Mar 02 2005 - 18:02:52 EST


On Wed, 2005-03-02 at 13:03 -0500, linux-os wrote:

> > event->dev = dev;
> > event->reset_state = rets[0];
> > event->time_unavail = rets[2];
> >
> > /* We may be called in an interrupt context */
> > spin_lock_irqsave(&eeh_eventlist_lock, flags);
> ^^^^^^^^^^^^^^^^^^
> > list_add(&event->list, &eeh_eventlist);
> > spin_unlock_irqrestore(&eeh_eventlist_lock, flags);
> ^^^^^^^^^^^^^^^^^^^^^
>
> I don't think this is SMP safe from interrupt-context.
> You need the lock when you are building the event-list,
> not just when you queue it.

Go buy a clue, they are cheap these days.

Ben.


-
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/