Subject: Re: [PATCH] net dst: fix percpu_counter list corruption and poison overwritten

From: Xiaotian Feng <[email-masked]>
Date: Wed, 03 Nov 2010 13:25:03 +0800

On 11/03/2010 01:22 PM, Eric Dumazet wrote:
> Le mercredi 03 novembre 2010 à 10:11 +0800, Xiaotian Feng a écrit :
>> There're some percpu_counter list corruption and poison overwritten warnings
>> in recent kernel, which is resulted by fc66f95c.
>>
>> commit fc66f95c switches to use percpu_counter, in ip6_route_net_init, kernel
>> init the percpu_counter for dst entries, but, the percpu_counter is never destroyed
>> in ip6_route_net_exit. So if the related data is freed by kernel, the freed percpu_counter
>> is still on the list, then if we insert/remove other percpu_counter, list corruption
>> resulted. Also, if the insert/remove option modifies the ->prev,->next pointer of
>> the freed value, the poison overwritten is resulted then.
>>
>> With the following patch, the percpu_counter list corruption and poison overwritten
>> warnings disappeared.
>>
>> Signed-off-by: Xiaotian Feng<[email-masked]>
>> Cc: "David S. Miller"<[email-masked]>
>> Cc: Alexey Kuznetsov<[email-masked]>
>> Cc: "Pekka Savola (ipv6)"<[email-masked]>
>> Cc: James Morris<[email-masked]>
>> Cc: Hideaki YOSHIFUJI<[email-masked]>
>> Cc: Patrick McHardy<[email-masked]>
>> ---
>
> Good catch, thanks !
>
> Any reason you didnt Cc me (the author of the patch) ?
Sorry, I just used get_maintainer.pl to get the cc list...
>
> Acked-by: Eric Dumazet<[email-masked]>
>
>
>
>