[zaptel-commits] mattf: branch 1.4 r2551 - in /branches/1.4: ./ wct4xxp/vpm450m.c

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Fri Jun 1 10:06:30 MST 2007


Author: mattf
Date: Fri Jun  1 12:06:29 2007
New Revision: 2551

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2551
Log:
Merged revisions 2550 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r2550 | mattf | 2007-06-01 11:56:09 -0500 (Fri, 01 Jun 2007) | 2 lines

Fix for stack overflow on FC6 and VPM450M.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/wct4xxp/vpm450m.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wct4xxp/vpm450m.c?view=diff&rev=2551&r1=2550&r2=2551
==============================================================================
--- branches/1.4/wct4xxp/vpm450m.c (original)
+++ branches/1.4/wct4xxp/vpm450m.c Fri Jun  1 12:06:29 2007
@@ -407,6 +407,7 @@
 	UINT32 ulResult;
 	struct vpm450m *vpm450m;
 	int x,y,law;
+	unsigned long flags;
 	
 	if (!(vpm450m = kmalloc(sizeof(struct vpm450m), GFP_KERNEL)))
 		return NULL;
@@ -476,9 +477,16 @@
 		return NULL;
 	}
 
+	/* I don't know what to curse more in this comment, the problems caused by
+	 * the 4K kernel stack limit change or the octasic API for being so darn
+	 * stack unfriendly.  Stupid, stupid, stupid.  So we disable IRQs so we
+	 * don't run the risk of overflowing the stack while we initialize the
+	 * octasic. */
+	local_irq_save(flags);
 	ulResult = Oct6100ChipOpen(vpm450m->pApiInstance, ChipOpen);
 	if (ulResult != cOCT6100_ERR_OK) {
 		printk("Failed to open chip, code %08x!\n", ulResult);
+		local_irq_restore(flags);
 		kfree(vpm450m);
 		kfree(ChipOpen);
 		kfree(ChannelOpen);
@@ -533,6 +541,7 @@
 		}
 	}
 
+	local_irq_restore(flags);
 	kfree(ChipOpen);
 	kfree(ChannelOpen);
 	return vpm450m;



More information about the zaptel-commits mailing list