Re: [PATCH] percpu_counter: fix CPU unplug race in percpu_counter_destroy()

David Miller
2008-12-04T06:13:32Z

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Wed, 03 Dec 2008 19:40:07 +0100

> While working on percpu_counter on net-next-2.6, I found
> a CPU unplug race in percpu_counter_destroy()
>
> (Very unlikely of course)
>
> Thank you
>
> [PATCH] percpu_counter: fix CPU unplug race in percpu_counter_destroy()
>
> We should first delete the counter from percpu_counters list
> before freeing memory, or a percpu_counter_hotcpu_callback()
> could dereference a NULL pointer.
>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

Acked-by: David S. Miller <davem@davemloft.net>