Linux-Next discussions
 help / color / mirror / Atom feed
* Re: [RFC 0/4] netfilter conntrack sysctls pernet support
From: Cyrill Gorcunov @ 2009-03-09 19:07 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: davem, netdev, linux-next, xemul, adobriyan,
	Netfilter Development Mailinglist
In-Reply-To: <49B56440.2010404@trash.net>

[Patrick McHardy - Mon, Mar 09, 2009 at 07:47:28PM +0100]
> First off, *please* CC netfilter-devel on patches relating to netfilter.
> I've said this a hundred times in direction of the container guys
> (not sure whether you specifically) and it keeps getting ignored.

Ugh... sorry Patrick, my fault, I've noticed this address in
MAINTEINERS but NETFILTER section contains 3 list so I messed
in which one I should choose. Sorry again.

>
> Cyrill Gorcunov wrote:
>> Hi here are a few patches to bring in per-net functionality
>> for several conntrack protocols: DCCP, SCTP, UDPlite.
>>
>> Since these protos could be built as modules I've put
>> per-net operations to module init/exit routines. The change
>> I would like you point the attention is that module static
>> variables being marked as __read_mostly become now as dynamically
>> allocated -- is it acceptable trade off?
>
> Well, there's no other choice I guess.

Actually, the possibility I see is to make some union on _all_
structures I put in pernet section so this union will contain
max possible size of structure allocated and then create one
global slab for this (HW cache aligned). But it would be ugly hack I
believe and until we have no other choise I would prefer to not
play with this idea :)

>
>> For protocols being built in (like TCP, UDP, ICMP) for which I made
>> patches too but they are in a bit 'rought' state: in original
>> code there some kind of reference counter to sysctl tables being
>> registered (and they don't have any kind of mb, didn't check if it
>> could be a problem for SMP since they are mostly __init functions)
>> so I need some kind of same functionality to count per-net calls.
>
> The tables are shared between IPv4 and IPv6, this keeps track of the
> number of current users to avoid unregistering it while the AF-specific
> module for either one is loaded. This would still be a global counter
> with containers I think since module loading is global and they should
> be visible in all containers if IPv4 or IPv6 conntrack is loaded.

Yes, I even thought about kref usage here but kref doesn't have a few
function I need.

>
>> Will send RFC for these protocols soon.
>>
>> So eventually I would like to hear some kind of feedback on this.
>> Ideas and any kind of comments are highly appreciated.
>
>> +	sn->sysctl_table[0].data = &sn->sctp_timeouts[SCTP_CONNTRACK_CLOSED];
>> +	sn->sysctl_table[1].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT];
>> +	sn->sysctl_table[2].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED];
>> +	sn->sysctl_table[3].data = &sn->sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED];
>> +	sn->sysctl_table[4].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT];
>> +	sn->sysctl_table[5].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD];
>> +	sn->sysctl_table[6].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT];
>
> Please use an iteration to avoid these repetitve overly long lines.
>

Ah, thanks a lot! Indeed.

	- Cyrill -

^ permalink raw reply

* Re: [RFC 0/4] netfilter conntrack sysctls pernet support
From: Patrick McHardy @ 2009-03-09 18:47 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: davem, netdev, linux-next, xemul, adobriyan,
	Netfilter Development Mailinglist
In-Reply-To: <20090309181628.109019157@gmail.com>

First off, *please* CC netfilter-devel on patches relating to netfilter.
I've said this a hundred times in direction of the container guys
(not sure whether you specifically) and it keeps getting ignored.

Cyrill Gorcunov wrote:
> Hi here are a few patches to bring in per-net functionality
> for several conntrack protocols: DCCP, SCTP, UDPlite.
> 
> Since these protos could be built as modules I've put
> per-net operations to module init/exit routines. The change
> I would like you point the attention is that module static
> variables being marked as __read_mostly become now as dynamically
> allocated -- is it acceptable trade off?

Well, there's no other choice I guess.

> For protocols being built in (like TCP, UDP, ICMP) for which I made
> patches too but they are in a bit 'rought' state: in original
> code there some kind of reference counter to sysctl tables being
> registered (and they don't have any kind of mb, didn't check if it
> could be a problem for SMP since they are mostly __init functions)
> so I need some kind of same functionality to count per-net calls.

The tables are shared between IPv4 and IPv6, this keeps track of the
number of current users to avoid unregistering it while the AF-specific
module for either one is loaded. This would still be a global counter
with containers I think since module loading is global and they should
be visible in all containers if IPv4 or IPv6 conntrack is loaded.

> Will send RFC for these protocols soon.
> 
> So eventually I would like to hear some kind of feedback on this.
> Ideas and any kind of comments are highly appreciated.

> +	sn->sysctl_table[0].data = &sn->sctp_timeouts[SCTP_CONNTRACK_CLOSED];
> +	sn->sysctl_table[1].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT];
> +	sn->sysctl_table[2].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED];
> +	sn->sysctl_table[3].data = &sn->sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED];
> +	sn->sysctl_table[4].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT];
> +	sn->sysctl_table[5].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD];
> +	sn->sysctl_table[6].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT];

Please use an iteration to avoid these repetitve overly long lines.

^ permalink raw reply

* [RFC 0/4] netfilter conntrack sysctls pernet support
From: Cyrill Gorcunov @ 2009-03-09 18:16 UTC (permalink / raw)
  To: davem, kaber; +Cc: netdev, linux-next, xemul, adobriyan

Hi here are a few patches to bring in per-net functionality
for several conntrack protocols: DCCP, SCTP, UDPlite.

Since these protos could be built as modules I've put
per-net operations to module init/exit routines. The change
I would like you point the attention is that module static
variables being marked as __read_mostly become now as dynamically
allocated -- is it acceptable trade off?

For protocols being built in (like TCP, UDP, ICMP) for which I made
patches too but they are in a bit 'rought' state: in original
code there some kind of reference counter to sysctl tables being
registered (and they don't have any kind of mb, didn't check if it
could be a problem for SMP since they are mostly __init functions)
so I need some kind of same functionality to count per-net calls.
Will send RFC for these protocols soon.

So eventually I would like to hear some kind of feedback on this.
Ideas and any kind of comments are highly appreciated.

The patches are on top of -net-next-2.6

Cyrill

^ permalink raw reply

* [RFC 3/4] net: netfilter conntrack - add per-net functionality for SCTP protocol
From: Cyrill Gorcunov @ 2009-03-09 18:16 UTC (permalink / raw)
  To: davem, kaber; +Cc: netdev, linux-next, xemul, adobriyan, Cyrill Gorcunov
In-Reply-To: <20090309181628.109019157@gmail.com>

[-- Attachment #1: net-namespace-nf-conntrack-proto-sctp --]
[-- Type: text/plain, Size: 11748 bytes --]

Module specific data moved into per-net site and being allocated/freed
during net namespace creation/deletion.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 net/netfilter/nf_conntrack_proto_sctp.c |  179 ++++++++++++++++++++++++--------
 1 file changed, 139 insertions(+), 40 deletions(-)

Index: linux-2.6.git/net/netfilter/nf_conntrack_proto_sctp.c
===================================================================
--- linux-2.6.git.orig/net/netfilter/nf_conntrack_proto_sctp.c
+++ linux-2.6.git/net/netfilter/nf_conntrack_proto_sctp.c
@@ -21,6 +21,9 @@
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
 
+#include <net/net_namespace.h>
+#include <net/netns/generic.h>
+
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
 #include <net/netfilter/nf_conntrack_ecache.h>
@@ -49,16 +52,6 @@ static const char *const sctp_conntrack_
 #define HOURS * 60 MINS
 #define DAYS  * 24 HOURS
 
-static unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] __read_mostly = {
-	[SCTP_CONNTRACK_CLOSED]			= 10 SECS,
-	[SCTP_CONNTRACK_COOKIE_WAIT]		= 3 SECS,
-	[SCTP_CONNTRACK_COOKIE_ECHOED]		= 3 SECS,
-	[SCTP_CONNTRACK_ESTABLISHED]		= 5 DAYS,
-	[SCTP_CONNTRACK_SHUTDOWN_SENT]		= 300 SECS / 1000,
-	[SCTP_CONNTRACK_SHUTDOWN_RECD]		= 300 SECS / 1000,
-	[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT]	= 3 SECS,
-};
-
 #define sNO SCTP_CONNTRACK_NONE
 #define	sCL SCTP_CONNTRACK_CLOSED
 #define	sCW SCTP_CONNTRACK_COOKIE_WAIT
@@ -130,6 +123,25 @@ static const u8 sctp_conntracks[2][9][SC
 	}
 };
 
+/* this module per-net specifics */
+static int sctp_net_id;
+struct sctp_net {
+	unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX];
+#ifdef CONFIG_SYSCTL
+	struct ctl_table_header *sysctl_header;
+	struct ctl_table *sysctl_table;
+#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
+	struct ctl_table_header *compat_sysctl_header;
+	struct ctl_table *compat_sysctl_table;
+#endif
+#endif
+};
+
+static inline struct sctp_net *sctp_pernet(struct net *net)
+{
+	return net_generic(net, sctp_net_id);
+}
+
 static bool sctp_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff,
 			      struct nf_conntrack_tuple *tuple)
 {
@@ -297,6 +309,7 @@ static int sctp_packet(struct nf_conn *c
 	const struct sctp_chunkhdr *sch;
 	struct sctp_chunkhdr _sch;
 	u_int32_t offset, count;
+	struct sctp_net *sn;
 	unsigned long map[256 / sizeof(unsigned long)] = { 0 };
 
 	sh = skb_header_pointer(skb, dataoff, sizeof(_sctph), &_sctph);
@@ -373,7 +386,8 @@ static int sctp_packet(struct nf_conn *c
 	}
 	write_unlock_bh(&sctp_lock);
 
-	nf_ct_refresh_acct(ct, ctinfo, skb, sctp_timeouts[new_state]);
+	sn = sctp_pernet(nf_ct_net(ct));
+	nf_ct_refresh_acct(ct, ctinfo, skb, sn->sctp_timeouts[new_state]);
 
 	if (old_state == SCTP_CONNTRACK_COOKIE_ECHOED &&
 	    dir == IP_CT_DIR_REPLY &&
@@ -540,54 +554,49 @@ static int nlattr_to_sctp(struct nlattr 
 #endif
 
 #ifdef CONFIG_SYSCTL
-static unsigned int sctp_sysctl_table_users;
-static struct ctl_table_header *sctp_sysctl_header;
+/*
+ * we use these tables as templates when create per-net syctl tables
+ * tables data will be assigned later
+ */
 static struct ctl_table sctp_sysctl_table[] = {
 	{
 		.procname	= "nf_conntrack_sctp_timeout_closed",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_CLOSED],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "nf_conntrack_sctp_timeout_cookie_wait",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "nf_conntrack_sctp_timeout_cookie_echoed",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "nf_conntrack_sctp_timeout_established",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "nf_conntrack_sctp_timeout_shutdown_sent",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "nf_conntrack_sctp_timeout_shutdown_recd",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "nf_conntrack_sctp_timeout_shutdown_ack_sent",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -601,49 +610,42 @@ static struct ctl_table sctp_sysctl_tabl
 static struct ctl_table sctp_compat_sysctl_table[] = {
 	{
 		.procname	= "ip_conntrack_sctp_timeout_closed",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_CLOSED],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "ip_conntrack_sctp_timeout_cookie_wait",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "ip_conntrack_sctp_timeout_cookie_echoed",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "ip_conntrack_sctp_timeout_established",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "ip_conntrack_sctp_timeout_shutdown_sent",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "ip_conntrack_sctp_timeout_shutdown_recd",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
 	},
 	{
 		.procname	= "ip_conntrack_sctp_timeout_shutdown_ack_sent",
-		.data		= &sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -653,7 +655,7 @@ static struct ctl_table sctp_compat_sysc
 	}
 };
 #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
-#endif
+#endif /* CONFIG_SYSCTL */
 
 static struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4 __read_mostly = {
 	.l3proto		= PF_INET,
@@ -673,14 +675,6 @@ static struct nf_conntrack_l4proto nf_co
 	.nlattr_to_tuple	= nf_ct_port_nlattr_to_tuple,
 	.nla_policy		= nf_ct_port_nla_policy,
 #endif
-#ifdef CONFIG_SYSCTL
-	.ctl_table_users	= &sctp_sysctl_table_users,
-	.ctl_table_header	= &sctp_sysctl_header,
-	.ctl_table		= sctp_sysctl_table,
-#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
-	.ctl_compat_table	= sctp_compat_sysctl_table,
-#endif
-#endif
 };
 
 static struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6 __read_mostly = {
@@ -701,21 +695,123 @@ static struct nf_conntrack_l4proto nf_co
 	.nlattr_to_tuple	= nf_ct_port_nlattr_to_tuple,
 	.nla_policy		= nf_ct_port_nla_policy,
 #endif
+};
+
+static __net_init int sctp_net_init(struct net *net)
+{
+	struct sctp_net *sn;
+	int err;
+
+	sn = kmalloc(sizeof(*sn), GFP_KERNEL);
+	if (!sn)
+		return -ENOMEM;
+
+	/* default values */
+	sn->sctp_timeouts[SCTP_CONNTRACK_CLOSED]	= 10 SECS;
+	sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT]	= 3 SECS;
+	sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED]	= 3 SECS;
+	sn->sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED]	= 5 DAYS;
+	sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT]	= 300 SECS / 1000;
+	sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD]	= 300 SECS / 1000;
+	sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = 3 SECS;
+
+	err = net_assign_generic(net, sctp_net_id, sn);
+	if (err)
+		goto out;
+
 #ifdef CONFIG_SYSCTL
-	.ctl_table_users	= &sctp_sysctl_table_users,
-	.ctl_table_header	= &sctp_sysctl_header,
-	.ctl_table		= sctp_sysctl_table,
+	err = -ENOMEM;
+	sn->sysctl_table = kmemdup(sctp_sysctl_table,
+			sizeof(sctp_sysctl_table), GFP_KERNEL);
+	if (!sn->sysctl_table)
+		goto out;
+
+	sn->sysctl_table[0].data = &sn->sctp_timeouts[SCTP_CONNTRACK_CLOSED];
+	sn->sysctl_table[1].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT];
+	sn->sysctl_table[2].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED];
+	sn->sysctl_table[3].data = &sn->sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED];
+	sn->sysctl_table[4].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT];
+	sn->sysctl_table[5].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD];
+	sn->sysctl_table[6].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT];
+
+	sn->sysctl_header = register_net_sysctl_table(net,
+			nf_net_netfilter_sysctl_path, sn->sysctl_table);
+	if (!sn->sysctl_header)
+		goto out_free;
+
+#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
+	sn->compat_sysctl_table = kmemdup(sctp_compat_sysctl_table,
+			sizeof(sctp_compat_sysctl_table), GFP_KERNEL);
+	if (!sn->compat_sysctl_table)
+		goto out_sysctl;
+
+	sn->compat_sysctl_table[0].data = &sn->sctp_timeouts[SCTP_CONNTRACK_CLOSED];
+	sn->compat_sysctl_table[1].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_WAIT];
+	sn->compat_sysctl_table[2].data = &sn->sctp_timeouts[SCTP_CONNTRACK_COOKIE_ECHOED];
+	sn->compat_sysctl_table[3].data = &sn->sctp_timeouts[SCTP_CONNTRACK_ESTABLISHED];
+	sn->compat_sysctl_table[4].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_SENT];
+	sn->compat_sysctl_table[5].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_RECD];
+	sn->compat_sysctl_table[6].data = &sn->sctp_timeouts[SCTP_CONNTRACK_SHUTDOWN_ACK_SENT];
+
+	sn->compat_sysctl_header = register_net_sysctl_table(net,
+			nf_net_ipv4_netfilter_sysctl_path, sn->compat_sysctl_table);
+	if (!sn->compat_sysctl_header)
+		goto out_free_compat;
+#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
+#endif /* CONFIG_SYSCTL */
+
+	return 0;
+
+#ifdef CONFIG_SYSCTL
+
+#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
+out_free_compat:
+	kfree(sn->compat_sysctl_table);
+#endif
+out_sysctl:
+	unregister_net_sysctl_table(sn->sysctl_header);
+out_free:
+	kfree(sn->sysctl_table);
+#endif
+
+out:
+	kfree(sn);
+	return err;
+}
+
+static __net_exit void sctp_net_exit(struct net *net)
+{
+	struct sctp_net *sn = sctp_pernet(net);
+#ifdef CONFIG_SYSCTL
+	unregister_net_sysctl_table(sn->sysctl_header);
+#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
+	unregister_net_sysctl_table(sn->compat_sysctl_header);
+	kfree(sn->compat_sysctl_table);
+#endif
+	kfree(sn->sysctl_table);
 #endif
+	kfree(sn);
+
+	net_assign_generic(net, sctp_net_id, NULL);
+}
+
+static struct pernet_operations sctp_net_ops = {
+	.init = sctp_net_init,
+	.exit = sctp_net_exit,
 };
 
 static int __init nf_conntrack_proto_sctp_init(void)
 {
 	int ret;
 
+	ret = register_pernet_gen_device(&sctp_net_id, &sctp_net_ops);
+	if (ret < 0)
+		goto out;
+
 	ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_sctp4);
 	if (ret) {
 		printk("nf_conntrack_l4proto_sctp4: protocol register failed\n");
-		goto out;
+		goto cleanup_net;
 	}
 	ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_sctp6);
 	if (ret) {
@@ -727,12 +823,15 @@ static int __init nf_conntrack_proto_sct
 
  cleanup_sctp4:
 	nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_sctp4);
+ cleanup_net:
+	unregister_pernet_gen_device(sctp_net_id, &sctp_net_ops);
  out:
 	return ret;
 }
 
 static void __exit nf_conntrack_proto_sctp_fini(void)
 {
+	unregister_pernet_gen_device(sctp_net_id, &sctp_net_ops);
 	nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_sctp6);
 	nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_sctp4);
 }

^ permalink raw reply

* [RFC 1/4] net: sysctl_net - use net_eq to compare nets
From: Cyrill Gorcunov @ 2009-03-09 18:16 UTC (permalink / raw)
  To: davem, kaber; +Cc: netdev, linux-next, xemul, adobriyan, Cyrill Gorcunov
In-Reply-To: <20090309181628.109019157@gmail.com>

[-- Attachment #1: net-sysctl-net-use-net_eq --]
[-- Type: text/plain, Size: 757 bytes --]

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---

Btw, wouldn't be better to have a special macro/inline
to check if net is init_net? Something like is_init_net()

 net/sysctl_net.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.git/net/sysctl_net.c
===================================================================
--- linux-2.6.git.orig/net/sysctl_net.c
+++ linux-2.6.git/net/sysctl_net.c
@@ -61,7 +61,7 @@ static struct ctl_table_root net_sysctl_
 static int net_ctl_ro_header_perms(struct ctl_table_root *root,
 		struct nsproxy *namespaces, struct ctl_table *table)
 {
-	if (namespaces->net_ns == &init_net)
+	if (net_eq(namespaces->net_ns, &init_net))
 		return table->mode;
 	else
 		return table->mode & ~0222;

^ permalink raw reply

* [RFC 4/4] net: netfilter conntrack - add per-net functionality for UDPLITE protocol
From: Cyrill Gorcunov @ 2009-03-09 18:16 UTC (permalink / raw)
  To: davem, kaber; +Cc: netdev, linux-next, xemul, adobriyan, Cyrill Gorcunov
In-Reply-To: <20090309181628.109019157@gmail.com>

[-- Attachment #1: net-namespace-nf-conntrack-proto-udplite --]
[-- Type: text/plain, Size: 6169 bytes --]

Module specific data moved into per-net site and being allocated/freed
during net namespace creation/deletion.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 net/netfilter/nf_conntrack_proto_udplite.c |  118 ++++++++++++++++++++++++-----
 1 file changed, 99 insertions(+), 19 deletions(-)

Index: linux-2.6.git/net/netfilter/nf_conntrack_proto_udplite.c
===================================================================
--- linux-2.6.git.orig/net/netfilter/nf_conntrack_proto_udplite.c
+++ linux-2.6.git/net/netfilter/nf_conntrack_proto_udplite.c
@@ -17,6 +17,9 @@
 #include <net/ip6_checksum.h>
 #include <net/checksum.h>
 
+#include <net/net_namespace.h>
+#include <net/netns/generic.h>
+
 #include <linux/netfilter.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/netfilter_ipv6.h>
@@ -24,8 +27,21 @@
 #include <net/netfilter/nf_conntrack_ecache.h>
 #include <net/netfilter/nf_log.h>
 
-static unsigned int nf_ct_udplite_timeout __read_mostly = 30*HZ;
-static unsigned int nf_ct_udplite_timeout_stream __read_mostly = 180*HZ;
+/* this module per-net specifics */
+static int udplite_net_id;
+struct udplite_net {
+	unsigned int udplite_timeout;
+	unsigned int udplite_timeout_stream;
+#ifdef CONFIG_SYSCTL
+	struct ctl_table_header *sysctl_header;
+	struct ctl_table *sysctl_table;
+#endif
+};
+
+static inline struct udplite_net *udplite_pernet(struct net *net)
+{
+	return net_generic(net, udplite_net_id);
+}
 
 static bool udplite_pkt_to_tuple(const struct sk_buff *skb,
 				 unsigned int dataoff,
@@ -68,16 +84,18 @@ static int udplite_packet(struct nf_conn
 			  u_int8_t pf,
 			  unsigned int hooknum)
 {
+	struct udplite_net *un = udplite_pernet(nf_ct_net(ct));
+
 	/* If we've seen traffic both ways, this is some kind of UDP
 	   stream.  Extend timeout. */
 	if (test_bit(IPS_SEEN_REPLY_BIT, &ct->status)) {
 		nf_ct_refresh_acct(ct, ctinfo, skb,
-				   nf_ct_udplite_timeout_stream);
+				   un->udplite_timeout_stream);
 		/* Also, more likely to be important, and not a probe */
 		if (!test_and_set_bit(IPS_ASSURED_BIT, &ct->status))
 			nf_conntrack_event_cache(IPCT_STATUS, ct);
 	} else
-		nf_ct_refresh_acct(ct, ctinfo, skb, nf_ct_udplite_timeout);
+		nf_ct_refresh_acct(ct, ctinfo, skb, un->udplite_timeout);
 
 	return NF_ACCEPT;
 }
@@ -142,13 +160,14 @@ static int udplite_error(struct net *net
 }
 
 #ifdef CONFIG_SYSCTL
-static unsigned int udplite_sysctl_table_users;
-static struct ctl_table_header *udplite_sysctl_header;
+/*
+ * we use it as a template when create per-net syctl table
+ * table data will be assigned later
+ */
 static struct ctl_table udplite_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_udplite_timeout",
-		.data		= &nf_ct_udplite_timeout,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -156,7 +175,6 @@ static struct ctl_table udplite_sysctl_t
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_udplite_timeout_stream",
-		.data		= &nf_ct_udplite_timeout_stream,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -183,11 +201,6 @@ static struct nf_conntrack_l4proto nf_co
 	.nlattr_to_tuple	= nf_ct_port_nlattr_to_tuple,
 	.nla_policy		= nf_ct_port_nla_policy,
 #endif
-#ifdef CONFIG_SYSCTL
-	.ctl_table_users	= &udplite_sysctl_table_users,
-	.ctl_table_header	= &udplite_sysctl_header,
-	.ctl_table		= udplite_sysctl_table,
-#endif
 };
 
 static struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite6 __read_mostly =
@@ -206,32 +219,99 @@ static struct nf_conntrack_l4proto nf_co
 	.nlattr_to_tuple	= nf_ct_port_nlattr_to_tuple,
 	.nla_policy		= nf_ct_port_nla_policy,
 #endif
+};
+
+static __net_init int udplite_net_init(struct net *net)
+{
+	struct udplite_net *un;
+	int err;
+
+	un = kmalloc(sizeof(*un), GFP_KERNEL);
+	if (!un)
+		return -ENOMEM;
+
+	/* default values */
+	un->udplite_timeout		= 30 * HZ;
+	un->udplite_timeout_stream	= 180 * HZ;
+
+	err = net_assign_generic(net, udplite_net_id, un);
+	if (err)
+		goto out;
+
+#ifdef CONFIG_SYSCTL
+	err = -ENOMEM;
+	un->sysctl_table = kmemdup(udplite_sysctl_table,
+			sizeof(udplite_sysctl_table), GFP_KERNEL);
+	if (!un->sysctl_table)
+		goto out;
+
+	un->sysctl_table[0].data = &un->udplite_timeout;
+	un->sysctl_table[1].data = &un->udplite_timeout_stream;
+
+	un->sysctl_header = register_net_sysctl_table(net,
+			nf_net_netfilter_sysctl_path, un->sysctl_table);
+	if (!un->sysctl_header)
+		goto out_free;
+#endif /* CONFIG_SYSCTL */
+
+	return 0;
+
+#ifdef CONFIG_SYSCTL
+out_free:
+	kfree(un->sysctl_table);
+#endif
+
+out:
+	kfree(un);
+	return err;
+}
+
+static __net_exit void udplite_net_exit(struct net *net)
+{
+	struct udplite_net *un = udplite_pernet(net);
 #ifdef CONFIG_SYSCTL
-	.ctl_table_users	= &udplite_sysctl_table_users,
-	.ctl_table_header	= &udplite_sysctl_header,
-	.ctl_table		= udplite_sysctl_table,
+	unregister_net_sysctl_table(un->sysctl_header);
+	kfree(un->sysctl_table);
 #endif
+	kfree(un);
+
+	net_assign_generic(net, udplite_net_id, NULL);
+}
+
+static struct pernet_operations udplite_net_ops = {
+	.init = udplite_net_init,
+	.exit = udplite_net_exit,
 };
 
 static int __init nf_conntrack_proto_udplite_init(void)
 {
 	int err;
 
-	err = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udplite4);
+	err = register_pernet_gen_device(&udplite_net_id, &udplite_net_ops);
 	if (err < 0)
 		goto err1;
-	err = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udplite6);
+
+	err = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udplite4);
 	if (err < 0)
 		goto err2;
+
+	err = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udplite6);
+	if (err < 0)
+		goto err3;
+
 	return 0;
-err2:
+
+err3:
 	nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udplite4);
+err2:
+	unregister_pernet_gen_device(udplite_net_id, &udplite_net_ops);
 err1:
 	return err;
 }
 
 static void __exit nf_conntrack_proto_udplite_exit(void)
 {
+	unregister_pernet_gen_device(udplite_net_id, &udplite_net_ops);
 	nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udplite6);
 	nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udplite4);
 }


^ permalink raw reply

* [RFC 2/4] net: netfilter conntrack - add per-net functionality for DCCP protocol
From: Cyrill Gorcunov @ 2009-03-09 18:16 UTC (permalink / raw)
  To: davem, kaber; +Cc: netdev, linux-next, xemul, adobriyan, Cyrill Gorcunov
In-Reply-To: <20090309181628.109019157@gmail.com>

[-- Attachment #1: net-namespace-nf-conntrack-proto-dccp --]
[-- Type: text/plain, Size: 9375 bytes --]

Module specific data moved into per-net site and being allocated/freed
during net namespace creation/deletion.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 net/netfilter/nf_conntrack_proto_dccp.c |  148 ++++++++++++++++++++++++--------
 1 file changed, 111 insertions(+), 37 deletions(-)

Index: linux-2.6.git/net/netfilter/nf_conntrack_proto_dccp.c
===================================================================
--- linux-2.6.git.orig/net/netfilter/nf_conntrack_proto_dccp.c
+++ linux-2.6.git/net/netfilter/nf_conntrack_proto_dccp.c
@@ -16,6 +16,9 @@
 #include <linux/skbuff.h>
 #include <linux/dccp.h>
 
+#include <net/net_namespace.h>
+#include <net/netns/generic.h>
+
 #include <linux/netfilter/nfnetlink_conntrack.h>
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_l4proto.h>
@@ -23,8 +26,6 @@
 
 static DEFINE_RWLOCK(dccp_lock);
 
-static int nf_ct_dccp_loose __read_mostly = 1;
-
 /* Timeouts are based on values from RFC4340:
  *
  * - REQUEST:
@@ -72,16 +73,6 @@ static int nf_ct_dccp_loose __read_mostl
 
 #define DCCP_MSL (2 * 60 * HZ)
 
-static unsigned int dccp_timeout[CT_DCCP_MAX + 1] __read_mostly = {
-	[CT_DCCP_REQUEST]	= 2 * DCCP_MSL,
-	[CT_DCCP_RESPOND]	= 4 * DCCP_MSL,
-	[CT_DCCP_PARTOPEN]	= 4 * DCCP_MSL,
-	[CT_DCCP_OPEN]		= 12 * 3600 * HZ,
-	[CT_DCCP_CLOSEREQ]	= 64 * HZ,
-	[CT_DCCP_CLOSING]	= 64 * HZ,
-	[CT_DCCP_TIMEWAIT]	= 2 * DCCP_MSL,
-};
-
 static const char * const dccp_state_names[] = {
 	[CT_DCCP_NONE]		= "NONE",
 	[CT_DCCP_REQUEST]	= "REQUEST",
@@ -393,6 +384,22 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][D
 	},
 };
 
+/* this module per-net specifics */
+static int dccp_net_id;
+struct dccp_net {
+	int dccp_loose;
+	unsigned int dccp_timeout[CT_DCCP_MAX + 1];
+#ifdef CONFIG_SYSCTL
+	struct ctl_table_header *sysctl_header;
+	struct ctl_table *sysctl_table;
+#endif
+};
+
+static inline struct dccp_net *dccp_pernet(struct net *net)
+{
+	return net_generic(net, dccp_net_id);
+}
+
 static bool dccp_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff,
 			      struct nf_conntrack_tuple *tuple)
 {
@@ -419,6 +426,7 @@ static bool dccp_new(struct nf_conn *ct,
 		     unsigned int dataoff)
 {
 	struct net *net = nf_ct_net(ct);
+	struct dccp_net *dn;
 	struct dccp_hdr _dh, *dh;
 	const char *msg;
 	u_int8_t state;
@@ -429,7 +437,8 @@ static bool dccp_new(struct nf_conn *ct,
 	state = dccp_state_table[CT_DCCP_ROLE_CLIENT][dh->dccph_type][CT_DCCP_NONE];
 	switch (state) {
 	default:
-		if (nf_ct_dccp_loose == 0) {
+		dn = dccp_pernet(net);
+		if (dn->dccp_loose == 0) {
 			msg = "nf_ct_dccp: not picking up existing connection ";
 			goto out_invalid;
 		}
@@ -465,6 +474,7 @@ static int dccp_packet(struct nf_conn *c
 		       u_int8_t pf, unsigned int hooknum)
 {
 	struct net *net = nf_ct_net(ct);
+	struct dccp_net *dn;
 	enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
 	struct dccp_hdr _dh, *dh;
 	u_int8_t type, old_state, new_state;
@@ -542,7 +552,9 @@ static int dccp_packet(struct nf_conn *c
 	ct->proto.dccp.last_pkt = type;
 	ct->proto.dccp.state = new_state;
 	write_unlock_bh(&dccp_lock);
-	nf_ct_refresh_acct(ct, ctinfo, skb, dccp_timeout[new_state]);
+
+	dn = dccp_pernet(net);
+	nf_ct_refresh_acct(ct, ctinfo, skb, dn->dccp_timeout[new_state]);
 
 	return NF_ACCEPT;
 }
@@ -660,13 +672,14 @@ static int nlattr_to_dccp(struct nlattr 
 #endif
 
 #ifdef CONFIG_SYSCTL
-static unsigned int dccp_sysctl_table_users;
-static struct ctl_table_header *dccp_sysctl_header;
-static ctl_table dccp_sysctl_table[] = {
+/*
+ * we use it as a template when create per-net syctl table
+ * table data will be assigned later
+ */
+static struct ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_request",
-		.data		= &dccp_timeout[CT_DCCP_REQUEST],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -674,7 +687,6 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_respond",
-		.data		= &dccp_timeout[CT_DCCP_RESPOND],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -682,7 +694,6 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_partopen",
-		.data		= &dccp_timeout[CT_DCCP_PARTOPEN],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -690,7 +701,6 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_open",
-		.data		= &dccp_timeout[CT_DCCP_OPEN],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -698,7 +708,6 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_closereq",
-		.data		= &dccp_timeout[CT_DCCP_CLOSEREQ],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -706,7 +715,6 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_closing",
-		.data		= &dccp_timeout[CT_DCCP_CLOSING],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -714,7 +722,6 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_timeout_timewait",
-		.data		= &dccp_timeout[CT_DCCP_TIMEWAIT],
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec_jiffies,
@@ -722,8 +729,7 @@ static ctl_table dccp_sysctl_table[] = {
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "nf_conntrack_dccp_loose",
-		.data		= &nf_ct_dccp_loose,
-		.maxlen		= sizeof(nf_ct_dccp_loose),
+		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec,
 	},
@@ -751,11 +757,6 @@ static struct nf_conntrack_l4proto dccp_
 	.nlattr_to_tuple	= nf_ct_port_nlattr_to_tuple,
 	.nla_policy		= nf_ct_port_nla_policy,
 #endif
-#ifdef CONFIG_SYSCTL
-	.ctl_table_users	= &dccp_sysctl_table_users,
-	.ctl_table_header	= &dccp_sysctl_header,
-	.ctl_table		= dccp_sysctl_table,
-#endif
 };
 
 static struct nf_conntrack_l4proto dccp_proto6 __read_mostly = {
@@ -776,34 +777,107 @@ static struct nf_conntrack_l4proto dccp_
 	.nlattr_to_tuple	= nf_ct_port_nlattr_to_tuple,
 	.nla_policy		= nf_ct_port_nla_policy,
 #endif
+};
+
+static __net_init int dccp_net_init(struct net *net)
+{
+	struct dccp_net *dn;
+	int err;
+
+	dn = kmalloc(sizeof(*dn), GFP_KERNEL);
+	if (!dn)
+		return -ENOMEM;
+
+	/* default values */
+	dn->dccp_loose = 1;
+	dn->dccp_timeout[CT_DCCP_REQUEST]	= 2 * DCCP_MSL;
+	dn->dccp_timeout[CT_DCCP_RESPOND]	= 4 * DCCP_MSL;
+	dn->dccp_timeout[CT_DCCP_PARTOPEN]	= 4 * DCCP_MSL;
+	dn->dccp_timeout[CT_DCCP_OPEN]		= 12 * 3600 * HZ;
+	dn->dccp_timeout[CT_DCCP_CLOSEREQ]	= 64 * HZ;
+	dn->dccp_timeout[CT_DCCP_CLOSING]	= 64 * HZ;
+	dn->dccp_timeout[CT_DCCP_TIMEWAIT]	= 2 * DCCP_MSL;
+
+	err = net_assign_generic(net, dccp_net_id, dn);
+	if (err)
+		goto out;
+
 #ifdef CONFIG_SYSCTL
-	.ctl_table_users	= &dccp_sysctl_table_users,
-	.ctl_table_header	= &dccp_sysctl_header,
-	.ctl_table		= dccp_sysctl_table,
+	err = -ENOMEM;
+	dn->sysctl_table = kmemdup(dccp_sysctl_table,
+			sizeof(dccp_sysctl_table), GFP_KERNEL);
+	if (!dn->sysctl_table)
+		goto out;
+
+	dn->sysctl_table[0].data = &dn->dccp_timeout[CT_DCCP_REQUEST];
+	dn->sysctl_table[1].data = &dn->dccp_timeout[CT_DCCP_RESPOND];
+	dn->sysctl_table[2].data = &dn->dccp_timeout[CT_DCCP_PARTOPEN];
+	dn->sysctl_table[3].data = &dn->dccp_timeout[CT_DCCP_OPEN];
+	dn->sysctl_table[4].data = &dn->dccp_timeout[CT_DCCP_CLOSEREQ];
+	dn->sysctl_table[5].data = &dn->dccp_timeout[CT_DCCP_CLOSING];
+	dn->sysctl_table[6].data = &dn->dccp_timeout[CT_DCCP_TIMEWAIT];
+	dn->sysctl_table[7].data = &dn->dccp_loose;
+
+	dn->sysctl_header = register_net_sysctl_table(net,
+			nf_net_netfilter_sysctl_path, dn->sysctl_table);
+	if (!dn->sysctl_header) {
+		kfree(dn->sysctl_table);
+		goto out;
+	}
 #endif
+
+	return 0;
+
+out:
+	kfree(dn);
+	return err;
+}
+
+static __net_exit void dccp_net_exit(struct net *net)
+{
+	struct dccp_net *dn = dccp_pernet(net);
+#ifdef CONFIG_SYSCTL
+	unregister_net_sysctl_table(dn->sysctl_header);
+	kfree(dn->sysctl_table);
+#endif
+	kfree(dn);
+
+	net_assign_generic(net, dccp_net_id, NULL);
+}
+
+static struct pernet_operations dccp_net_ops = {
+	.init = dccp_net_init,
+	.exit = dccp_net_exit,
 };
 
 static int __init nf_conntrack_proto_dccp_init(void)
 {
 	int err;
 
-	err = nf_conntrack_l4proto_register(&dccp_proto4);
+	err = register_pernet_gen_device(&dccp_net_id, &dccp_net_ops);
 	if (err < 0)
 		goto err1;
 
-	err = nf_conntrack_l4proto_register(&dccp_proto6);
+	err = nf_conntrack_l4proto_register(&dccp_proto4);
 	if (err < 0)
 		goto err2;
+
+	err = nf_conntrack_l4proto_register(&dccp_proto6);
+	if (err < 0)
+		goto err3;
 	return 0;
 
-err2:
+err3:
 	nf_conntrack_l4proto_unregister(&dccp_proto4);
+err2:
+	unregister_pernet_gen_device(dccp_net_id, &dccp_net_ops);
 err1:
 	return err;
 }
 
 static void __exit nf_conntrack_proto_dccp_fini(void)
 {
+	unregister_pernet_gen_device(dccp_net_id, &dccp_net_ops);
 	nf_conntrack_l4proto_unregister(&dccp_proto6);
 	nf_conntrack_l4proto_unregister(&dccp_proto4);
 }


^ permalink raw reply

* linux-next: no release for March 9
From: Stephen Rothwell @ 2009-03-09  7:58 UTC (permalink / raw)
  To: linux-next; +Cc: LKML

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

Hi all,

It was a public holiday here today, so no release.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: linux-next: manual merge of the rr tree with the blackfin and x86 trees
From: Rusty Russell @ 2009-03-07  1:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, Bryan Wu, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin
In-Reply-To: <20090306153759.c8c6b470.sfr@canb.auug.org.au>

On Friday 06 March 2009 15:07:59 Stephen Rothwell wrote:
> Hi Rusty,
> 
> Today's linux-next merge of the rr tree added conflicts in
> arch/blackfin/kernel/ipipe.c and arch/x86/mach-voyager/setup.c.  I didn't
> bother to work out exactly what is conflicting because I dropped the rr
> tree due to the build failures that I assume are still present from
> yesterday.

Good call.  Arabella didn't quite sleep long enough for me to get the fixes
out yesterday.

I've moved the arch/blackfin/kernel/ipipe.c patch out of linux-next until I've
sorted this.

Thanks,
Rusty.

^ permalink raw reply

* Re: linux-next: manual merge of the ieee1394 tree with the  tree
From: Stephen Rothwell @ 2009-03-07  0:39 UTC (permalink / raw)
  To: Stefan Richter; +Cc: linux1394-devel, linux-next
In-Reply-To: <49B0D5F6.7000106@s5r6.in-berlin.de>

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

Hi Stefan,

On Fri, 06 Mar 2009 08:51:18 +0100 Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
>
> Thanks.  I pushed this conflict resolution into linux1394-2.6.git too now.

Thanks, every bit helps.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: [PATCH -next] dvb/frontends: fix duplicate 'debug' symbol
From: Randy Dunlap @ 2009-03-07  0:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: sfr, linux-next, linux-kernel, linux-media, mchehab, Ingo Molnar
In-Reply-To: <20090306155958.11b4a186.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Fri, 06 Mar 2009 13:24:46 -0800
> Randy Dunlap <randy.dunlap@oracle.com> wrote:
> 
>> It would also be Good if arch/x86/kernel/entry_32.S didn't have a
>> non-static 'debug' symbol.  OTOH, it helps catch things like this one.
> 
> heh, yes, it's a feature.  We should put it in init/main.c, along with
> 100-odd other dont-do-that-dopey symbols.

hm, I think I'll leave that patch for you or Ingo. ;)

-- 
~Randy

^ permalink raw reply

* Re: [PATCH -next] dvb/frontends: fix duplicate 'debug' symbol
From: Andrew Morton @ 2009-03-06 23:59 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: sfr, linux-next, linux-kernel, linux-media, mchehab, Ingo Molnar
In-Reply-To: <49B1949E.2000300@oracle.com>

On Fri, 06 Mar 2009 13:24:46 -0800
Randy Dunlap <randy.dunlap@oracle.com> wrote:

> It would also be Good if arch/x86/kernel/entry_32.S didn't have a
> non-static 'debug' symbol.  OTOH, it helps catch things like this one.

heh, yes, it's a feature.  We should put it in init/main.c, along with
100-odd other dont-do-that-dopey symbols.

^ permalink raw reply

* [PATCH -next] dvb/frontends: fix duplicate 'debug' symbol
From: Randy Dunlap @ 2009-03-06 21:24 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, LKML, linux-media, Mauro Carvalho Chehab,
	Andrew Morton
In-Reply-To: <20090306191311.697e7b97.sfr@canb.auug.org.au>

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix dvb frontend debug variable to be static, to avoid linker
errors:

drivers/built-in.o:(.data+0xf4b0): multiple definition of `debug'
arch/x86/kernel/built-in.o:(.kprobes.text+0x90): first defined here
ld: Warning: size of symbol `debug' changed from 85 in arch/x86/kernel/built-in.o to 4 in drivers/built-in.o

It would also be Good if arch/x86/kernel/entry_32.S didn't have a
non-static 'debug' symbol.  OTOH, it helps catch things like this one.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/media/dvb/frontends/stv0900_core.c |    4 ++--
 drivers/media/dvb/frontends/stv0900_priv.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- linux-next-20090306.orig/drivers/media/dvb/frontends/stv0900_core.c
+++ linux-next-20090306/drivers/media/dvb/frontends/stv0900_core.c
@@ -34,8 +34,8 @@
 #include "stv0900_priv.h"
 #include "stv0900_init.h"
 
-int debug = 1;
-module_param(debug, int, 0644);
+static int stvdebug = 1;
+module_param_named(debug, stvdebug, int, 0644);
 
 /* internal params node */
 struct stv0900_inode {
--- linux-next-20090306.orig/drivers/media/dvb/frontends/stv0900_priv.h
+++ linux-next-20090306/drivers/media/dvb/frontends/stv0900_priv.h
@@ -62,11 +62,11 @@
 
 #define dmd_choose(a, b)	(demod = STV0900_DEMOD_2 ? b : a))
 
-extern int debug;
+static int stvdebug;
 
 #define dprintk(args...) \
 	do { \
-		if (debug) \
+		if (stvdebug) \
 			printk(KERN_DEBUG args); \
 	} while (0)
 

^ permalink raw reply

* Re: linux-next: Tree for March 6 (ath9k)
From: John W. Linville @ 2009-03-06 19:40 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Gabor Juhos, Stephen Rothwell, linux-next-u79uwXL29TY76Z2rM5mHXA,
	LKML, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <49B17C4E.3000004-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On Fri, Mar 06, 2009 at 11:41:02AM -0800, Randy Dunlap wrote:
> Gabor Juhos wrote:
> > Randy Dunlap írta:
> >> Stephen Rothwell wrote:
> >>> Hi all,
> >>>
> >>> Linus' release of -rc7 seems to have stirred people up a bit ...
> >>>
> >>> Changes since 20090305:
> >>
> >> when CONFIG_RFKILL=n, ath9k/virtual.c causes:
> >>
> >> (.text+0x224e83): undefined reference to `ath_radio_disable'
> >> (.text+0x224e8b): undefined reference to `ath_radio_enable'
> >>
> >>
> > 
> > Hi,
> > 
> > I have submitted a patch for this already:
> > http://marc.info/?l=linux-wireless&m=123633468314970&w=2
> > 
> > Should I send it to somewhere else as well?
> 
> It hasn't propagated into the linux-next merging yet...

He just sent it today (or overnight).  I'll get it into wireless-next.

John

P.S.  I'm starting to think that RFKILL should just be mandatory...
-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: linux-next: Tree for March 6 (ath9k)
From: Randy Dunlap @ 2009-03-06 19:41 UTC (permalink / raw)
  To: Gabor Juhos
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML,
	linux-wireless@vger.kernel.org, linville@tuxdriver.com
In-Reply-To: <49B17B12.3050200@openwrt.org>

Gabor Juhos wrote:
> Randy Dunlap írta:
>> Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Linus' release of -rc7 seems to have stirred people up a bit ...
>>>
>>> Changes since 20090305:
>>
>> when CONFIG_RFKILL=n, ath9k/virtual.c causes:
>>
>> (.text+0x224e83): undefined reference to `ath_radio_disable'
>> (.text+0x224e8b): undefined reference to `ath_radio_enable'
>>
>>
> 
> Hi,
> 
> I have submitted a patch for this already:
> http://marc.info/?l=linux-wireless&m=123633468314970&w=2
> 
> Should I send it to somewhere else as well?

It hasn't propagated into the linux-next merging yet...


-- 
~Randy

^ permalink raw reply

* Re: linux-next: Tree for March 6 (ath9k)
From: Gabor Juhos @ 2009-03-06 19:35 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, linux-next-u79uwXL29TY76Z2rM5mHXA, LKML,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <49B17320.8010000-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Randy Dunlap írta:
> Stephen Rothwell wrote:
>> Hi all,
>>
>> Linus' release of -rc7 seems to have stirred people up a bit ...
>>
>> Changes since 20090305:
> 
> 
> when CONFIG_RFKILL=n, ath9k/virtual.c causes:
> 
> (.text+0x224e83): undefined reference to `ath_radio_disable'
> (.text+0x224e8b): undefined reference to `ath_radio_enable'
> 
> 

Hi,

I have submitted a patch for this already:
http://marc.info/?l=linux-wireless&m=123633468314970&w=2

Should I send it to somewhere else as well?

Gabor


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: linux-next: Tree for March 6
From: Andrew Morton @ 2009-03-06 19:24 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Rusty Russell
In-Reply-To: <20090306191311.697e7b97.sfr@canb.auug.org.au>

On Fri, 6 Mar 2009 19:13:11 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Dropped trees (temporary):
> 	rr (build problem)

It's quite irritating and somewhat risky when this happens.  It means
that I have to teporarily drop or rework patches to fix things up. 
Then the patch needs to be undropped or unreworked when the offending
tree gets restored.

Is it possible to just drop back to the previous day's version when
something gets screwed up?

^ permalink raw reply

* Re: linux-next: Tree for March 6 (ath9k)
From: Randy Dunlap @ 2009-03-06 19:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next-u79uwXL29TY76Z2rM5mHXA, LKML,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <20090306191311.697e7b97.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>

Stephen Rothwell wrote:
> Hi all,
> 
> Linus' release of -rc7 seems to have stirred people up a bit ...
> 
> Changes since 20090305:


when CONFIG_RFKILL=n, ath9k/virtual.c causes:

(.text+0x224e83): undefined reference to `ath_radio_disable'
(.text+0x224e8b): undefined reference to `ath_radio_enable'



-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: linux-next: x86 tree build warning
From: Ingo Molnar @ 2009-03-06 11:05 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, linux-next
In-Reply-To: <aa79d98a0903052123i770bc198i425ac2389a8986fa@mail.gmail.com>


* Cyrill Gorcunov <gorcunov@gmail.com> wrote:

> On Fri, Mar 6, 2009 at 7:01 AM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> > On 3/6/09, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >> Hi all,
> >>
> >> Today's linux-next build (x86_64 allmodconfig) produced this warning:
> >>
> >> In file included from drivers/char/epca.c:49:
> >> drivers/char/digiFep1.h:7:1: warning: "GLOBAL" redefined
> >> In file included from include/linux/linkage.h:5,
> >>                  from include/linux/kernel.h:11,
> >>                  from arch/x86/include/asm/system.h:10,
> >>                  from arch/x86/include/asm/processor.h:17,
> >>                  from include/linux/prefetch.h:14,
> >>                  from include/linux/list.h:6,
> >>                  from include/linux/module.h:9,
> >>                  from drivers/char/epca.c:29:
> >> arch/x86/include/asm/linkage.h:55:1: warning: this is the location of the
> >> previous definition
> >>
> >> Probably introduced by commit 95695547a7db44b88a7ee36cf5df188de267e99e
> >> ("x86: asm linkage - introduce GLOBAL macro") from the x86 tree.
> >> --
> >> Cheers,
> >> Stephen Rothwell                    sfr@canb.auug.org.au
> >> http://www.canb.auug.org.au/~sfr/
> >>
> >
> > Thanks Stephen, i will take a look. Iirc the same macro used as well
> > in ia64 arch, weird.
> >
> 
> I've just checked the sources -- it seems some definitions in 
> arch/x86/include/asm/linkage.h should be guarded by 
> __ASSEMBLY__ (ie -- __ALIGN, __ALIGN_STR and eventually 
> GLOBAL). I'll make a patch today evening (can't get access to 
> linux machine right now). Ingo?

sure, that's fine. It's not a fatal warning.

	Ingo

^ permalink raw reply

* Re: linux-next: manual merge of the tracing tree with the tip-core tree
From: Frederic Weisbecker @ 2009-03-06 10:41 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-next,
	Rusty Russell
In-Reply-To: <20090306121740.0dc19811.sfr@canb.auug.org.au>

On Fri, Mar 06, 2009 at 12:17:40PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the tracing tree got a conflict in
> block/blktrace.c between commit 313e458f81ec3852106c5a83830fe0d4f405a71a
> ("alloc_percpu: add align argument to __alloc_percpu") from the tip-core
> tree and commit 2db270a80b8f2238e536876cfb3987af02684df8
> ("tracing/blktrace: move the tracing file to kernel/trace") from the
> tracing tree.
> 
> I applied the block/blktrace.c part of the former commit to
> kernel/trace/blktrace.c (see below) and can carry this fix as necessary.
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
> 
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index e39679a..d24a10b 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -423,7 +423,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
>  	if (!bt->sequence)
>  		goto err;
>  
> -	bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG);
> +	bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG, __alignof__(char));
>  	if (!bt->msg_data)
>  		goto err;
>  

Hi,

It looks like this problem is solved on tip/master.

^ permalink raw reply

* Re: linux-next: manual merge of the kmemcheck tree with the tracing tree
From: Ingo Molnar @ 2009-03-06 10:27 UTC (permalink / raw)
  To: Vegard Nossum; +Cc: Stephen Rothwell, Pekka Enberg, linux-next
In-Reply-To: <19f34abd0903060014p4895f169vc6759b672aa399aa@mail.gmail.com>


* Vegard Nossum <vegard.nossum@gmail.com> wrote:

> 2009/3/6 Stephen Rothwell <sfr@canb.auug.org.au>:
> > Hi all,
> >
> > Today's linux-next merge of the kmemcheck tree got a conflict in
> > kernel/trace/ring_buffer.c between commit
> > a81bd80a0b0a405dc0483e2c428332d69da2c79f ("ring-buffer: use generic
> > version of in_nmi") from the tracing tree and commit
> > 9b7ff384ee76ced9638ab236db588a6f13916336 ("trace: annotate bitfields in
> > struct ring_buffer_event") from the kmemcheck tree.
> >
> > Just simple overlapping additions.  I fixed it up (see below) and can
> > carry the fix as necessary.
> > --
> > Cheers,
> > Stephen Rothwell                    sfr@canb.auug.org.au
> > http://www.canb.auug.org.au/~sfr/
> >
> > diff --cc kernel/trace/ring_buffer.c
> > index f747364,b1f2f60..0000000
> > --- a/kernel/trace/ring_buffer.c
> > +++ b/kernel/trace/ring_buffer.c
> > @@@ -9,7 -7,7 +9,8 @@@
> >  #include <linux/spinlock.h>
> >  #include <linux/debugfs.h>
> >  #include <linux/uaccess.h>
> >  +#include <linux/hardirq.h>
> > + #include <linux/kmemcheck.h>
> >  #include <linux/module.h>
> >  #include <linux/percpu.h>
> >  #include <linux/mutex.h>
> >
> 
> Isn't it amazing how we both managed to put our new include in 
> exactly the same spot? :-D

Yeah - i tend to shuffle patches and order include file sections 
of headers to reduce it - but most of the time it doesnt matter 
as fixing such a conflict is about 2 seconds.

> Anyway, thanks for fixing these up, it looks good to me!

I suspect it's the same resolution like what i did in tip:master 
a few days ago or so? I dont send out notifications about 
trivial conflicts, only about non-trivial conflicts that i'm 
unsure about. That's rare - when i see a non-trivial conflict i 
work on eliminating it.

	Ingo

^ permalink raw reply

* Re: linux-next: state of the trees
From: Stefan Richter @ 2009-03-06  9:41 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, LKML
In-Reply-To: <20090306155634.cc6c682d.sfr@canb.auug.org.au>

Stephen Rothwell wrote:
...
> the numbers following the
> name are the total number of outstanding commits (relative to all the
> preceding trees) and the number after doing "git patch-id" matching with
> Linus' tree and all the previous trees.  Thus the order of the trees
> makes a difference to the numbers.
...
> ieee1394		112	94

The precise number would be 44.  The rest are mostly commits which were
equivalently folded into larger ones and then merged into mainline.
-- 
Stefan Richter
-=====-==--= --== --==-
http://arcgraph.de/sr/

^ permalink raw reply

* Re: next-20090220: XFS: inconsistent lock state
From: Alexander Beregalov @ 2009-03-06  9:30 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Felix Blyakher, Eric Sandeen, linux-next@vger.kernel.org, LKML,
	xfs
In-Reply-To: <20090303170248.GA7036@infradead.org>

Hi

Is it the same issue?

[ INFO: inconsistent lock state ]
2.6.29-rc7-next-20090305 #8
---------------------------------
inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage.
kswapd0/318 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&(&ip->i_lock)->mr_lock){+++++?}, at: [<ffffffff803cbc4a>]
xfs_ilock+0xaa/0x120
{RECLAIM_FS-ON-W} state was registered at:
  [<ffffffff8026db49>] mark_held_locks+0x69/0x90
  [<ffffffff8026dbb1>] lockdep_trace_alloc+0x41/0xb0
  [<ffffffff802c6cbd>] kmem_cache_alloc+0x2d/0x100
  [<ffffffff803f37e7>] kmem_zone_alloc+0x97/0xe0
  [<ffffffff803f3849>] kmem_zone_zalloc+0x19/0x50
  [<ffffffff803b4955>] xfs_da_state_alloc+0x15/0x20
  [<ffffffff803c0387>] xfs_dir2_node_lookup+0x17/0x110
  [<ffffffff803b9688>] xfs_dir_lookup+0x1c8/0x1e0
  [<ffffffff803f08af>] xfs_lookup+0x4f/0xe0
  [<ffffffff803fcb99>] xfs_vn_lookup+0x49/0x90
  [<ffffffff802d5556>] do_lookup+0x1b6/0x250
  [<ffffffff802d5885>] __link_path_walk+0x295/0xec0
  [<ffffffff802d66ee>] path_walk+0x6e/0xe0
  [<ffffffff802d6866>] do_path_lookup+0xa6/0x1d0
  [<ffffffff802d6a65>] path_lookup_open+0x65/0xd0
  [<ffffffff802d796a>] do_filp_open+0xaa/0x8f0
  [<ffffffff802c8a48>] do_sys_open+0x78/0x110
  [<ffffffff802c8b0b>] sys_open+0x1b/0x20
  [<ffffffff8020bbdb>] system_call_fastpath+0x16/0x1b
  [<ffffffffffffffff>] 0xffffffffffffffff
irq event stamp: 531011
hardirqs last  enabled at (531011): [<ffffffff80284194>]
__rcu_read_unlock+0xa4/0xc0
hardirqs last disabled at (531010): [<ffffffff80284149>]
__rcu_read_unlock+0x59/0xc0
softirqs last  enabled at (524334): [<ffffffff80249719>]
__do_softirq+0x139/0x150
softirqs last disabled at (524329): [<ffffffff8020cd5c>] call_softirq+0x1c/0x30

other info that might help us debug this:
2 locks held by kswapd0/318:
 #0:  (shrinker_rwsem){++++..}, at: [<ffffffff802a4c12>] shrink_slab+0x32/0x1c0
 #1:  (iprune_mutex){+.+.-.}, at: [<ffffffff802dfbc4>]
shrink_icache_memory+0x84/0x2a0

stack backtrace:
Pid: 318, comm: kswapd0 Not tainted 2.6.29-rc7-next-20090305 #8
Call Trace:
 [<ffffffff8026ca5d>] print_usage_bug+0x17d/0x190
 [<ffffffff8026d9ad>] mark_lock+0x31d/0x450
 [<ffffffff8026cbd0>] ? check_usage_forwards+0x0/0xc0
 [<ffffffff8026ebcd>] __lock_acquire+0x40d/0x12a0
 [<ffffffff8026faf1>] lock_acquire+0x91/0xc0
 [<ffffffff803cbc4a>] ? xfs_ilock+0xaa/0x120
 [<ffffffff8025f7d0>] down_read_nested+0x50/0x90
 [<ffffffff803cbc4a>] ? xfs_ilock+0xaa/0x120
 [<ffffffff803cbc4a>] xfs_ilock+0xaa/0x120
 [<ffffffff803f09c4>] xfs_free_eofblocks+0x84/0x280
 [<ffffffff8026ea8c>] ? __lock_acquire+0x2cc/0x12a0
 [<ffffffff803f144e>] xfs_inactive+0xee/0x540
 [<ffffffff803fea57>] xfs_fs_clear_inode+0x67/0x70
 [<ffffffff802df7fa>] clear_inode+0x9a/0x120
 [<ffffffff802dfa60>] dispose_list+0x30/0x110
 [<ffffffff802dfd88>] shrink_icache_memory+0x248/0x2a0
 [<ffffffff802a4d3c>] shrink_slab+0x15c/0x1c0
 [<ffffffff802a6cba>] kswapd+0x56a/0x6b0
 [<ffffffff802374b6>] ? finish_task_switch+0x46/0x110
 [<ffffffff802a4120>] ? isolate_pages_global+0x0/0x270
 [<ffffffff8025b450>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff802a6750>] ? kswapd+0x0/0x6b0
 [<ffffffff8025af66>] kthread+0x56/0x90
 [<ffffffff8020cc5a>] child_rip+0xa/0x20
 [<ffffffff802374f9>] ? finish_task_switch+0x89/0x110
 [<ffffffff8063da36>] ? _spin_unlock_irq+0x36/0x60
 [<ffffffff8020c640>] ? restore_args+0x0/0x30
 [<ffffffff8025af10>] ? kthread+0x0/0x90
 [<ffffffff8020cc50>] ? child_rip+0x0/0x20

^ permalink raw reply

* Re: linux-next: state of the trees
From: Andrew Morton @ 2009-03-06  9:19 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, LKML
In-Reply-To: <20090306155634.cc6c682d.sfr@canb.auug.org.au>

On Fri, 6 Mar 2009 15:56:34 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> The summary from the diffstat looks like this:
> 
>  4711 files changed, 646856 insertions(+, 216616 deletions(-)

It would be entertaining to compare that with the 2.6.30-rc1 diffstat.

^ permalink raw reply

* Re: linux-next: manual merge of the kmemcheck tree with the tracing tree
From: Vegard Nossum @ 2009-03-06  8:14 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Pekka Enberg, Ingo Molnar, linux-next
In-Reply-To: <20090306172721.40347f41.sfr@canb.auug.org.au>

2009/3/6 Stephen Rothwell <sfr@canb.auug.org.au>:
> Hi all,
>
> Today's linux-next merge of the kmemcheck tree got a conflict in
> kernel/trace/ring_buffer.c between commit
> a81bd80a0b0a405dc0483e2c428332d69da2c79f ("ring-buffer: use generic
> version of in_nmi") from the tracing tree and commit
> 9b7ff384ee76ced9638ab236db588a6f13916336 ("trace: annotate bitfields in
> struct ring_buffer_event") from the kmemcheck tree.
>
> Just simple overlapping additions.  I fixed it up (see below) and can
> carry the fix as necessary.
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
>
> diff --cc kernel/trace/ring_buffer.c
> index f747364,b1f2f60..0000000
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@@ -9,7 -7,7 +9,8 @@@
>  #include <linux/spinlock.h>
>  #include <linux/debugfs.h>
>  #include <linux/uaccess.h>
>  +#include <linux/hardirq.h>
> + #include <linux/kmemcheck.h>
>  #include <linux/module.h>
>  #include <linux/percpu.h>
>  #include <linux/mutex.h>
>

Isn't it amazing how we both managed to put our new include in exactly
the same spot? :-D

Anyway, thanks for fixing these up, it looks good to me!


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox