[svn-commits] sruffell: linux/trunk r10695 - /linux/trunk/drivers/dahdi/wcte12xp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 22 12:59:36 CDT 2012


Author: sruffell
Date: Fri Jun 22 12:59:34 2012
New Revision: 10695

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10695
Log:
wcte12xp: Destroy the cache if the linemode is not recognized.

Fixes the following errors when running:
  # modprobe wcte12xp default_linemode=blah; modprobe wcte12xp default_linemode=blah

'blah' is an unknown span type.kmem_cache_create: duplicate cache wcte12xp

Call Trace:
 [<ffffffff800394cf>] kmem_cache_create+0x572/0x5ac
 [<ffffffff800a926e>] __link_module+0x0/0x18
 [<ffffffff80064624>] __down_read+0x12/0x92
 [<ffffffff8002224d>] __up_read+0x19/0x7f
 [<ffffffff8818b01f>] :wcte12xp:te12xp_init+0x1f/0xde
 [<ffffffff800a9e37>] sys_init_module+0xbd/0x206
 [<ffffffff8005d28d>] tracesys+0xd5/0xe0

Reported-by: James Brown <jbrown at digium.com>
Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wcte12xp/base.c

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=10695&r1=10694&r2=10695
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Fri Jun 22 12:59:34 2012
@@ -2933,6 +2933,7 @@
 		   strcasecmp(default_linemode, "e1")) {
 		pr_err("'%s' is an unknown span type.", default_linemode);
 		default_linemode = "auto";
+		kmem_cache_destroy(cmd_cache);
 		return -EINVAL;
 	}
 	res = dahdi_pci_module(&te12xp_driver);




More information about the svn-commits mailing list