diff mbox

[2/3] tcp: Like icmp use register_pernet_subsys

Message ID m163j5hzow.fsf_-_@fess.ebiederm.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric W. Biederman Feb. 20, 2009, 3:53 p.m. UTC
To remove the possibility of packets flying around when network
devices are being cleaned up use reisger_pernet_subsys instead of
register_pernet_device.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
---
 net/ipv4/tcp_ipv4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Denis V. Lunev Feb. 20, 2009, 3:57 p.m. UTC | #1
Acked-by: Denis V. Lunev <den@openvz.org>

On Fri, 2009-02-20 at 07:53 -0800, Eric W. Biederman wrote:
> To remove the possibility of packets flying around when network
> devices are being cleaned up use reisger_pernet_subsys instead of
> register_pernet_device.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
> ---
>  net/ipv4/tcp_ipv4.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index f6b962f..a738120 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -2443,7 +2443,7 @@ static struct pernet_operations __net_initdata tcp_sk_ops = {
>  void __init tcp_v4_init(void)
>  {
>  	inet_hashinfo_init(&tcp_hashinfo);
> -	if (register_pernet_device(&tcp_sk_ops))
> +	if (register_pernet_subsys(&tcp_sk_ops))
>  		panic("Failed to create the TCP control socket.\n");
>  }
>  

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 22, 2009, 8:10 a.m. UTC | #2
From: "Denis V. Lunev" <den@openvz.org>
Date: Fri, 20 Feb 2009 18:57:23 +0300

> Acked-by: Denis V. Lunev <den@openvz.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index f6b962f..a738120 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2443,7 +2443,7 @@  static struct pernet_operations __net_initdata tcp_sk_ops = {
 void __init tcp_v4_init(void)
 {
 	inet_hashinfo_init(&tcp_hashinfo);
-	if (register_pernet_device(&tcp_sk_ops))
+	if (register_pernet_subsys(&tcp_sk_ops))
 		panic("Failed to create the TCP control socket.\n");
 }