Patchwork [1/1] tunnels: fix netns vs proto registration ordering -- fix stable backport

login
register
mail settings
Submitter Andy Whitcroft
Date Aug. 30, 2011, 12:44 p.m.
Message ID <1314708263-25950-2-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/112279/
State New
Headers show

Comments

Andy Whitcroft - Aug. 30, 2011, 12:44 p.m.
As per Stratos Psomadakis the backport of the upstream commit below is
flawed and introduces crashes when using this ipv6 tunnel type:

  commit a14a3f90745c4831a1437528706b38daa1db4885
  Author: Alexey Dobriyan <adobriyan@gmail.com>
  Date:   Tue Feb 16 09:05:04 2010 +0000

    tunnels: fix netns vs proto registration ordering

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 net/ipv6/ip6_tunnel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Stefan Bader - Aug. 30, 2011, 1:04 p.m.
On 30.08.2011 14:44, Andy Whitcroft wrote:
> As per Stratos Psomadakis the backport of the upstream commit below is
> flawed and introduces crashes when using this ipv6 tunnel type:
> 
>   commit a14a3f90745c4831a1437528706b38daa1db4885
>   Author: Alexey Dobriyan <adobriyan@gmail.com>
>   Date:   Tue Feb 16 09:05:04 2010 +0000
> 
>     tunnels: fix netns vs proto registration ordering
> 
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
>  net/ipv6/ip6_tunnel.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index 7fb3e02..53e0d51 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -1466,7 +1466,7 @@ static int __init ip6_tunnel_init(void)
>  {
>  	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)
>  		goto out_pernet;
>  

Looks like the proposed patch on the stable ml. Also looks obvious after being
pointed out (as  the ipv4 part makes no change there).

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Tim Gardner - Aug. 30, 2011, 1:12 p.m.
On 08/30/2011 06:44 AM, Andy Whitcroft wrote:
> As per Stratos Psomadakis the backport of the upstream commit below is
> flawed and introduces crashes when using this ipv6 tunnel type:
>
>    commit a14a3f90745c4831a1437528706b38daa1db4885
>    Author: Alexey Dobriyan<adobriyan@gmail.com>
>    Date:   Tue Feb 16 09:05:04 2010 +0000
>
>      tunnels: fix netns vs proto registration ordering
>
> Signed-off-by: Andy Whitcroft<apw@canonical.com>
> ---
>   net/ipv6/ip6_tunnel.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
> index 7fb3e02..53e0d51 100644
> --- a/net/ipv6/ip6_tunnel.c
> +++ b/net/ipv6/ip6_tunnel.c
> @@ -1466,7 +1466,7 @@ static int __init ip6_tunnel_init(void)
>   {
>   	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)
>   		goto out_pernet;
>

I used 832332 as the bug number. I wonder if it'll wreck the stable bug 
tracking process, but there _was_ an entry for Lucid just waiting to be 
set to 'Fix Committed'.

rtg
Brad Figg - Aug. 30, 2011, 3:12 p.m.
On 08/30/2011 06:12 AM, Tim Gardner wrote:
> On 08/30/2011 06:44 AM, Andy Whitcroft wrote:
>> As per Stratos Psomadakis the backport of the upstream commit below is
>> flawed and introduces crashes when using this ipv6 tunnel type:
>>
>> commit a14a3f90745c4831a1437528706b38daa1db4885
>> Author: Alexey Dobriyan<adobriyan@gmail.com>
>> Date: Tue Feb 16 09:05:04 2010 +0000
>>
>> tunnels: fix netns vs proto registration ordering
>>
>> Signed-off-by: Andy Whitcroft<apw@canonical.com>
>> ---
>> net/ipv6/ip6_tunnel.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
>> index 7fb3e02..53e0d51 100644
>> --- a/net/ipv6/ip6_tunnel.c
>> +++ b/net/ipv6/ip6_tunnel.c
>> @@ -1466,7 +1466,7 @@ static int __init ip6_tunnel_init(void)
>> {
>> 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)
>> goto out_pernet;
>>
>
> I used 832332 as the bug number. I wonder if it'll wreck the stable bug tracking process, but there _was_ an entry for Lucid just waiting to be set to 'Fix Committed'.
>
> rtg

Yes, please don't do that. This needs a regular bug with SRU justification and
all the rest.

Brad
Steve Conklin - Aug. 31, 2011, 9:11 p.m.
On 08/30/2011 08:12 AM, Tim Gardner wrote:
> On 08/30/2011 06:44 AM, Andy Whitcroft wrote:
>> As per Stratos Psomadakis the backport of the upstream commit below is
>> flawed and introduces crashes when using this ipv6 tunnel type:
>>
>>    commit a14a3f90745c4831a1437528706b38daa1db4885
>>    Author: Alexey Dobriyan<adobriyan@gmail.com>
>>    Date:   Tue Feb 16 09:05:04 2010 +0000
>>
>>      tunnels: fix netns vs proto registration ordering
>>
>> Signed-off-by: Andy Whitcroft<apw@canonical.com>
>> ---
>>   net/ipv6/ip6_tunnel.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
>> index 7fb3e02..53e0d51 100644
>> --- a/net/ipv6/ip6_tunnel.c
>> +++ b/net/ipv6/ip6_tunnel.c
>> @@ -1466,7 +1466,7 @@ static int __init ip6_tunnel_init(void)
>>   {
>>       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)
>>           goto out_pernet;
>>
>
> I used 832332 as the bug number. I wonder if it'll wreck the stable
> bug tracking process, but there _was_ an entry for Lucid just waiting
> to be set to 'Fix Committed'.
>
> rtg
I created a new bug and rewrote the commit with the new bug number.

Steve

Patch

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 7fb3e02..53e0d51 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1466,7 +1466,7 @@  static int __init ip6_tunnel_init(void)
 {
 	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)
 		goto out_pernet;