[zaptel-commits] mattf: branch 1.2 r2550 -
/branches/1.2/wct4xxp/vpm450m.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Fri Jun 1 09:56:10 MST 2007
Author: mattf
Date: Fri Jun 1 11:56:09 2007
New Revision: 2550
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2550
Log:
Fix for stack overflow on FC6 and VPM450M.
Modified:
branches/1.2/wct4xxp/vpm450m.c
Modified: branches/1.2/wct4xxp/vpm450m.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/vpm450m.c?view=diff&rev=2550&r1=2549&r2=2550
==============================================================================
--- branches/1.2/wct4xxp/vpm450m.c (original)
+++ branches/1.2/wct4xxp/vpm450m.c Fri Jun 1 11:56:09 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;
@@ -475,9 +476,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);
@@ -532,6 +540,7 @@
}
}
+ local_irq_restore(flags);
kfree(ChipOpen);
kfree(ChannelOpen);
return vpm450m;
More information about the zaptel-commits
mailing list