Re: [PATCH net] net/ipv6: fix metrics leak

2018-07-30 Thread David Miller
From: Sabrina Dubroca Date: Mon, 30 Jul 2018 16:23:10 +0200 > Since commit d4ead6b34b67 ("net/ipv6: move metrics from dst to > rt6_info"), ipv6 metrics are shared and refcounted. rt6_set_from() > assigns the rt->from pointer and increases the refcount on from's > metrics. This reference is never

[PATCH net] net/ipv6: fix metrics leak

2018-07-30 Thread Sabrina Dubroca
Since commit d4ead6b34b67 ("net/ipv6: move metrics from dst to rt6_info"), ipv6 metrics are shared and refcounted. rt6_set_from() assigns the rt->from pointer and increases the refcount on from's metrics. This reference is never released. Introduce the fib6_metrics_release() helper and use it to r