]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: move stub initialization after ipv6 setup completion
authorPaolo Abeni <pabeni@redhat.com>
Mon, 24 Apr 2017 12:18:28 +0000 (14:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 15:43:16 +0000 (11:43 -0400)
commitc0a78e976518aa55b4402b7e42ef5366c82b1a1b
tree43d9faf0dde9e65a188eac09d951d937c423b3f6
parent4c2eb617c25f7bc767ef1020fbb5a5a296ba6e62
ipv6: move stub initialization after ipv6 setup completion

The ipv6 stub pointer is currently initialized before the ipv6
routing subsystem: a 3rd party can access and use such stub
before the routing data is ready.
Moreover, such pointer is not cleared in case of initialization
error, possibly leading to dangling pointers usage.

This change addresses the above moving the stub initialization
at the end of ipv6 init code.

Fixes: 71150a0fd209 ("ipv6: export a stub for IPv6 symbols used by vxlan")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/af_inet6.c