Re: [PATCH] net dst: fix percpu_counter list corruption and poisonoverwritten

From: Eric Dumazet
Date: Wed Nov 03 2010 - 01:24:46 EST


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 <dfeng@xxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
> Cc: "Pekka Savola (ipv6)" <pekkas@xxxxxxxxxx>
> Cc: James Morris <jmorris@xxxxxxxxx>
> Cc: Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>
> Cc: Patrick McHardy <kaber@xxxxxxxxx>
> ---

Good catch, thanks !

Any reason you didnt Cc me (the author of the patch) ?

Acked-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>



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