* [PATCH] Fix kernel BUG() with iptree IP set on 2.4
@ 2005-06-21 16:04 Marcus Sundberg
0 siblings, 0 replies; only message in thread
From: Marcus Sundberg @ 2005-06-21 16:04 UTC (permalink / raw)
To: Jozsef Kadlecsik; +Cc: netfilter-devel
Hi,
The slab cache in 2.4(.31) uses a fixed length array for slab cache
names, causing a BUG() in mm/slab.c:kmem_cache_create() to be
triggered when attempting to create a cache who's name is longer
than 18 characters. The patch below makes iptree work on 2.4 kernels
as well:
//Marcus
--- net/ipv4/netfilter/ip_set_iptree.c 2005/06/21 15:06:15 1.1
+++ net/ipv4/netfilter/ip_set_iptree.c 2005/06/21 15:08:00
@@ -472,19 +472,19 @@
{
int ret;
- branch_cachep = kmem_cache_create("ip_set_iptree_branches",
+ branch_cachep = kmem_cache_create("iptree_branches",
sizeof(struct ip_set_iptreeb),
0, 0, NULL, NULL);
if (!branch_cachep) {
- printk(KERN_ERR "Unable to create ip_set_iptree_branches slab cache\n");
+ printk(KERN_ERR "Unable to create iptree_branches slab cache\n");
ret = -ENOMEM;
goto out;
}
- leaf_cachep = kmem_cache_create("ip_set_iptree_leaves",
+ leaf_cachep = kmem_cache_create("iptree_leaves",
sizeof(struct ip_set_iptreed),
0, 0, NULL, NULL);
if (!leaf_cachep) {
- printk(KERN_ERR "Unable to create ip_set_iptree_leaves slab cache\n");
+ printk(KERN_ERR "Unable to create iptree_leaves slab cache\n");
ret = -ENOMEM;
goto free_branch;
}
--
---------------------------------------+--------------------------
Marcus Sundberg <marcus@ingate.com> | Firewalls with SIP & NAT
Software Developer, Ingate Systems AB | http://www.ingate.com/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-21 16:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 16:04 [PATCH] Fix kernel BUG() with iptree IP set on 2.4 Marcus Sundberg
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.