提交 2aed2827 编写于 作者: P Pavel Emelyanov 提交者: David S. Miller

[NETNS]: The ip6_fib_timer can work with garbage on net namespace stop.

The del_timer() function doesn't guarantee, that the timer callback
is not active by the time it exits.

Thus, the fib6_net_exit() may kfree() all the data, that is required
by the fib6_run_gc(). The race window is tiny, but slab poisoning can
trigger this bug.

Using del_timer_sync() will cure this.
Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f25c3d61
......@@ -1543,7 +1543,7 @@ static int fib6_net_init(struct net *net)
static void fib6_net_exit(struct net *net)
{
rt6_ifdown(net, NULL);
del_timer(net->ipv6.ip6_fib_timer);
del_timer_sync(net->ipv6.ip6_fib_timer);
kfree(net->ipv6.ip6_fib_timer);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.fib6_local_tbl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册