]> git.baikalelectronics.ru Git - kernel.git/commit
gre: fix netns vs proto registration ordering
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 16 Feb 2010 07:57:44 +0000 (07:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2010 22:55:21 +0000 (14:55 -0800)
commit94997e33907e55110fb08088860b2aff5c48b0f3
treef6da925f46344ea4f1e3a7887aca4e62be6ea3ff
parentc42f77730b46796dd7413284f3834bdf7efe8d55
gre: fix netns vs proto registration ordering

GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().

This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c