From: Marcus Sundberg <marcus@ingate.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@lists.netfilter.org
Subject: [PATCH] Fix kernel BUG() with iptree IP set on 2.4
Date: Tue, 21 Jun 2005 18:04:40 +0200 [thread overview]
Message-ID: <42B83A98.4070909@ingate.com> (raw)
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/
reply other threads:[~2005-06-21 16:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=42B83A98.4070909@ingate.com \
--to=marcus@ingate.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@lists.netfilter.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.