]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Move ipv6 proc file registration to end of init order
authorThomas Graf <tgraf@suug.ch>
Mon, 18 Jun 2012 12:08:33 +0000 (12:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Jun 2012 01:38:50 +0000 (18:38 -0700)
commitd181ddff4f3d22caba7f91078340360e29a22033
tree22d89d2747004ecdfaa7093734fb3bd96366f59a
parent052af8441eb668c8d9bca096cbfebf5ad9758e01
ipv6: Move ipv6 proc file registration to end of init order

/proc/net/ipv6_route reflects the contents of fib_table_hash. The proc
handler is installed in ip6_route_net_init() whereas fib_table_hash is
allocated in fib6_net_init() _after_ the proc handler has been installed.

This opens up a short time frame to access fib_table_hash with its pants
down.

Move the registration of the proc files to a later point in the init
order to avoid the race.

Tested :-)

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c