Re: Kernel crash after using new Intel NIC (igb)

From: Ingo Molnar
Date: Sat May 28 2011 - 14:05:44 EST



* Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:

> > +static inline int atomic_add_unless(atomic_t *v, int a, int u)
> > +{
> > + return __atomic_add_unless(v, a, u) != u;
> > }
> >
> > #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
>
> As I said, atomic_add_unless() has several implementations in
> various arches. You must take care of all, not only x86.

It's a bit sad to see local hacks to generic facilities committed
upstream like that.

Arun: the x86 bits look good at first sight.

Thanks,

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