]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Aug 2011 17:23:17 +0000 (10:23 -0700)
commit7606088a8d06062750d6d24cab6e064d7711356e
tree67f2d3bf3bd8fbcd7c0b3d415473f9dad6f08d84
parent39371f2a8a7c27a63882c1586c3ee72f05eb6527
gre: fix netns vs proto registration ordering

commit c2892f02712e9516d72841d5c019ed6916329794 upstream.

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>
[dannf: backported to Debian's 2.6.32]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/ip_gre.c