[svn-commits] sruffell: linux/trunk r6237 - /linux/trunk/drivers/dahdi/wctc4xxp/base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Mar 24 10:59:58 CDT 2009
Author: sruffell
Date: Tue Mar 24 10:59:55 2009
New Revision: 6237
URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6237
Log:
Do not define the debug flags if CONFIG_SLUB is not set.
Some versions of the kernel (2.6.18-92.1.22.el5) have patches in them to panic
if a slab cache is created with unsupported flags.
Modified:
linux/trunk/drivers/dahdi/wctc4xxp/base.c
Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=6237&r1=6236&r2=6237
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Tue Mar 24 10:59:55 2009
@@ -3717,15 +3717,23 @@
static int __init wctc4xxp_init(void)
{
int res;
+ unsigned long cache_flags;
+
+#if defined(CONFIG_SLUB) && (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22))
+ cache_flags = SLAB_HWCACHE_ALIGN | SLAB_STORE_USER | SLAB_DEBUG_FREE;
+#else
+ cache_flags = SLAB_HWCACHE_ALIGN;
+#endif
+
#ifdef USE_CUSTOM_MEMCACHE
cmd_cache = my_cache_create();
#else
# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb),
- 0, SLAB_HWCACHE_ALIGN | SLAB_STORE_USER | SLAB_DEBUG_FREE, NULL, NULL);
+ 0, cache_flags, NULL, NULL);
# else
cmd_cache = kmem_cache_create(THIS_MODULE->name, sizeof(struct tcb),
- 0, SLAB_HWCACHE_ALIGN, NULL);
+ 0, cache_flags, NULL);
# endif
#endif
More information about the svn-commits
mailing list