Thread (4 messages) 4 messages, 4 authors, 2008-08-06

Re: [PATCH] AX.25: Fix sysctl registration if !CONFIG_AX25_DAMA_SLAVE

From: Krzysztof Oledzki <hidden>
Date: 2008-08-06 02:35:59
Also in: linux-hams


On Wed, 6 Aug 2008, Al Viro wrote:
On Tue, Aug 05, 2008 at 06:47:37PM -0700, David Miller wrote:
quoted
From: Ralf Baechle <redacted>
Date: Tue, 5 Aug 2008 23:37:36 +0100
quoted
Since 49ffcf8f99e8d33ec8afb450956804af518fd788
setting struct ctl_table.procname = NULL does no longer work as it used to
the way the AX.25 code is expecting it to resulting in the AX.25 sysctl
registration code to break if CONFIG_AX25_DAMA_SLAVE was not set as in some
distribution kernels.  Kernel releases from 2.6.24 are affected.

Signed-off-by: Ralf Baechle <redacted>
Applied, and I'll queue it up for -stable too.
BTW, here's netfilter sysctl one:
Please hold, still working on this.
quoted hunk ↗ jump to hunk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 292fa28..655d743 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -264,6 +264,12 @@ EXPORT_SYMBOL(proc_net_netfilter);
void __init netfilter_init(void)
{
	int i, h;
+
+#ifdef CONFIG_SYSCTL
+	static struct ctl_table empty[1];
+	register_sysctl_paths(nf_net_netfilter_sysctl_path, empty);
+#endif
I think that instead of adding an empty nf_net_netfilter_sysctl_path 
registration, it would be better to fix the order of register/unregister:
@@ -1032,10 +1032,10 @@
         nf_ct_free_hashtable(nf_conntrack_hash, nf_conntrack_vmalloc,
                              nf_conntrack_htable_size);

-       nf_conntrack_proto_fini();
-       nf_conntrack_helper_fini();
-       nf_conntrack_expect_fini();
         nf_conntrack_acct_fini();
+       nf_conntrack_expect_fini();
+       nf_conntrack_helper_fini();
+       nf_conntrack_proto_fini();
  }
I have a patch ready, only need to make some more tests.

Best regards,

 				Krzysztof Olędzki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help