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

Benjamin Herrenschmidt
2005-03-02T22:40:51Z

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.