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

From: Benjamin Herrenschmidt <benh_at_kernel.crashing.org>
Date: 2005-03-03 09:40:51
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-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Mar 2 17:51:49 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:36 EST