Commit c5ed1561 authored by Stratos Psomadakis's avatar Stratos Psomadakis Committed by Greg Kroah-Hartman

Fix broken backport for IPv6 tunnels

Fix broken backport for IPv6 tunnels in 2.6.32-longterm kernels.

upstream commit d5aa407f ("tunnels: fix
netns vs proto registration ordering") , which was included in
2.6.32.44-longterm, was not backported correctly, and results in a NULL
pointer dereference in ip6_tunnel.c for longterm kernels >=2.6.32.44

Use [un]register_pernet_gen_device() instead of
[un]register_pernet_device() to fix it.
Signed-off-by: default avatarStratos Psomadakis <psomas@gentoo.org>
Cc: Wolfgang Walter <wolfgang.walter@stwm.de>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent abc7edfb
...@@ -1466,7 +1466,7 @@ static int __init ip6_tunnel_init(void) ...@@ -1466,7 +1466,7 @@ static int __init ip6_tunnel_init(void)
{ {
int err; int err;
err = register_pernet_device(&ip6_tnl_net_ops); err = register_pernet_gen_device(&ip6_tnl_net_id, &ip6_tnl_net_ops);
if (err < 0) if (err < 0)
goto out_pernet; goto out_pernet;
...@@ -1487,7 +1487,7 @@ static int __init ip6_tunnel_init(void) ...@@ -1487,7 +1487,7 @@ static int __init ip6_tunnel_init(void)
out_ip6ip6: out_ip6ip6:
xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET); xfrm6_tunnel_deregister(&ip4ip6_handler, AF_INET);
out_ip4ip6: out_ip4ip6:
unregister_pernet_device(&ip6_tnl_net_ops); unregister_pernet_gen_device(ip6_tnl_net_id, &ip6_tnl_net_ops);
out_pernet: out_pernet:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment