Re: [PATCH] net: Fix __inet_inherit_port() to correctly increment bsockets and num_owners

Nagendra Tomar
2010-11-26T11:01:12Z

--- On Fri, 26/11/10, Eric Dumazet <eric.dumazet@gmail.com> wrote:

>
> Problem is your patch is not applicable to current tree.
>
> In order to submit it to stable team, you should first post
> a patch for
> next/current kernel (net-next-2.6 tree).
>

Thanks, Erik.
I'd made the patch against 2.6.36.1 which is the latest stable kernel per kernel.org. I thought that was the right kernel version to make a patch against.
I do not use git. Shall I make a patch against linux-next as it appears in kernel.org.

> David will decide if its net-2.6 material or not.
>
> You could add in your changelog the problem comes from
> commit
> a9d8f9110d7e953c (inet: Allowing more than 64k connections
> and heavily
> optimize bind(0)), included in 2.6.30, to ease stable team
> work.
>
> On current tree your patch would be :
>
> diff --git a/net/ipv4/inet_hashtables.c
> b/net/ipv4/inet_hashtables.c
> index 1b344f3..3c0369a 100644
> --- a/net/ipv4/inet_hashtables.c
> +++ b/net/ipv4/inet_hashtables.c
> @@ -133,8 +133,7 @@ int __inet_inherit_port(struct sock
> *sk, struct sock *child)
>
> }
>         }
>     }
> -    sk_add_bind_node(child,
> &tb->owners);
> -    inet_csk(child)->icsk_bind_hash =
> tb;
> +    inet_bind_hash(child, tb, port);
>     spin_unlock(&head->lock);
>
>     return 0;
>
>
>

Thanks,
Tomar