[svn-commits] fjoe: freebsd/trunk r10738 - in /freebsd/trunk/drivers/dahdi: wct4xxp/ wcte12xp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 5 09:12:05 CST 2012


Author: fjoe
Date: Wed Dec  5 09:12:00 2012
New Revision: 10738

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10738
Log:
Do not kfree(wc) on FreeBSD.  This fixes kernel memory corruption
(and thus kernel panics or hangs) on driver unload.

Modified:
    freebsd/trunk/drivers/dahdi/wct4xxp/base.c
    freebsd/trunk/drivers/dahdi/wcte12xp/base.c

Modified: freebsd/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=10738&r1=10737&r2=10738
==============================================================================
--- freebsd/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wct4xxp/base.c Wed Dec  5 09:12:00 2012
@@ -2095,7 +2095,9 @@
 	kfree(wc->ddev->location);
 	kfree(wc->ddev->hardware_id);
 	dahdi_free_device(wc->ddev);
+#if !defined(__FreeBSD__)
 	kfree(wc);
+#endif
 }
 
 /**
@@ -5233,7 +5235,9 @@
 
 	wc->ddev = dahdi_create_device(wc->dev);
 	if (!wc->ddev) {
+#if !defined(__FreeBSD__)
 		kfree(wc);
+#endif
 		return -ENOMEM;
 	}
 

Modified: freebsd/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=10738&r1=10737&r2=10738
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wcte12xp/base.c Wed Dec  5 09:12:00 2012
@@ -2772,7 +2772,9 @@
 	wc->ddev = dahdi_create_device(wc->vb.pdev);
 	if (!wc->ddev) {
 		ifaces[index] = NULL;
+#if !defined(__FreeBSD__)
 		kfree(wc);
+#endif
 		return -ENOMEM;
 	}
 	wc->ddev->manufacturer = "Digium";
@@ -2781,7 +2783,9 @@
 				      dahdi_pci_get_slot(wc->vb.pdev));
 	if (!wc->ddev->location) {
 		ifaces[index] = NULL;
+#if !defined(__FreeBSD__)
 		kfree(wc);
+#endif
 		return -ENOMEM;
 	}
 
@@ -2817,7 +2821,9 @@
 	
 	wc->wq = create_singlethread_workqueue(wc->name);
 	if (!wc->wq) {
+#if !defined(__FreeBSD__)
 		kfree(wc);
+#endif
 		ifaces[index] = NULL;
 		return -ENOMEM;
 	}




More information about the svn-commits mailing list