summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
diff options
context:
space:
mode:
authorWendell Thompson <wthompson@digium.com>2009-03-06 21:43:34 +0000
committerWendell Thompson <wthompson@digium.com>2009-03-06 21:43:34 +0000
commitf14b7a897b2921fcdf47393fd10e45ef76bcadd7 (patch)
tree176f35dd9607aef96de81ddf6bfe6adc0047c50c /drivers/dahdi/wctc4xxp
parent0d6d88767a176475bc7e87feb18a6b6b267180f4 (diff)
Workarounds for SLUB sysfs problems in kernel 2.6.22 with CONFIG_SLUB and CONFIG_SLUB_DEBUG, as in Fedora Core 6.
Fixes kernel oops when loading/unloading dahdi modules. DAHDI-226 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6096 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 757d09d..5fcdabe 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -3375,13 +3375,17 @@ static struct pci_driver wctc4xxp_driver = {
static int __init wctc4xxp_init(void)
{
int res;
-# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb), 0,
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)
+ SLAB_HWCACHE_ALIGN | SLAB_STORE_USER, NULL, NULL);
+#else
SLAB_HWCACHE_ALIGN, NULL, NULL);
-# else
+#endif
+#else
cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb), 0,
SLAB_HWCACHE_ALIGN, NULL);
-# endif
+#endif
if (!cmd_cache) {
return -ENOMEM;