All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, containers@lists.osdl.org
Subject: Re: [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit.
Date: Sat, 01 Mar 2008 01:05:41 +0300	[thread overview]
Message-ID: <1204322741.7867.3.camel@iris.sw.ru> (raw)
In-Reply-To: <20080229.112342.76764059.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

On Fri, 2008-02-29 at 11:23 -0800, David Miller wrote:
> From: "Denis V. Lunev" <den@openvz.org>
> Date: Fri, 29 Feb 2008 16:40:58 +0300
> 
> > +static void __net_exit icmpv6_sk_exit(struct net *net)
> > +{
> 
> Since you call this from __new_init code, won't this
> create a section conflict when ipv6 is built statically
> into the kernel?

Dave, you are perfectly correct :) Though, I have made a similar mistake
in the IPv4 code. Pls consider the patch attached.

[-- Attachment #2: diff-icmp-section.txt --]
[-- Type: text/plain, Size: 560 bytes --]

[ICMP]: Section conflict between icmp_sk_init/icmp_sk_exit.

Functions from __exit section should not be called from ones in __init
section. Fix this conflict.

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index b51f4b0..cee77d6 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -1198,7 +1198,9 @@ int __net_init icmp_sk_init(struct net *net)
 	return 0;
 
 fail:
-	icmp_sk_exit(net);
+	for_each_possible_cpu(i)
+		sk_release_kernel(net->ipv4.icmp_sk[i]);
+	kfree(net->ipv4.icmp_sk);
 	return err;
 }
 

  parent reply	other threads:[~2008-02-29 22:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 13:39 [PATCH 0/12 net-2.6.26] icmp_socket namespacing Denis V. Lunev
2008-02-29 13:40 ` [PATCH 1/12 net-2.6.26] [INET]: Remove struct net_proto_family* from _init calls Denis V. Lunev
2008-02-29 13:40 ` [PATCH 2/12 net-2.6.26] [ICMP]: Add return code to icmp_init Denis V. Lunev
2008-02-29 13:40 ` [PATCH 3/12 net-2.6.26] [ICMP]: Optimize icmp_socket usage Denis V. Lunev
2008-02-29 13:40 ` [PATCH 4/12 net-2.6.26] [ICMP]: Store sock rather than socket for ICMP flow control Denis V. Lunev
2008-02-29 13:40 ` [PATCH 5/12 net-2.6.26] [ICMP]: Pass proper ICMP socket into icmp(v6)_xmit_(un)lock Denis V. Lunev
2008-02-29 13:40 ` [PATCH 6/12 net-2.6.26] [ICMP]: Allocate data for __icmp(v6)_sk dynamically Denis V. Lunev
2008-02-29 13:40 ` [PATCH 7/12 net-2.6.26] No need for a separate __netlink_release call Denis V. Lunev
2008-02-29 13:40 ` [PATCH 8/12 net-2.6.26] Make netlink_kernel_release publically available as sk_release_kernel Denis V. Lunev
2008-02-29 13:40 ` [PATCH 9/12 net-2.6.26] [NETNS]: icmp(v6)_sk should not pin a namespace Denis V. Lunev
2008-02-29 19:35   ` David Miller
2008-02-29 13:40 ` [PATCH 10/12] [NETNS]: Make icmp_sk per namespace Denis V. Lunev
2008-02-29 13:40 ` [PATCH 11/12] [NETNS]: Make icmpv6_sk " Denis V. Lunev
2008-02-29 13:40 ` [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit Denis V. Lunev
2008-02-29 19:23   ` David Miller
2008-02-29 20:12     ` Purpose of __net_exit & friends [Was: [ICMP6]: Consolidate fail ...] Sam Ravnborg
2008-02-29 20:23       ` Purpose of __net_exit & friends David Miller
2008-02-29 22:05     ` Denis V. Lunev [this message]
2008-02-29 22:15       ` [PATCH 12/12 net-2.6.26] [ICMP6]: Consolidate fail path icmpv6_sk_init with icmpv6_sk_exit David Miller
2008-02-29 19:23 ` [PATCH 0/12 net-2.6.26] icmp_socket namespacing David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204322741.7867.3.camel@iris.sw.ru \
    --to=den@openvz.org \
    --cc=containers@lists.osdl.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.