diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-06-01 16:56:09 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-06-01 16:56:09 +0000 |
commit | f88c809d8d6d3144ef4d59745f9e9ec91dfcb722 (patch) | |
tree | 7e623f5557789ddcef67bcb705c71130c9ef4572 /wct4xxp | |
parent | b60055aaf954c868bc0b5398295de3886535a29f (diff) |
Fix for stack overflow on FC6 and VPM450M.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2550 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp')
-rw-r--r-- | wct4xxp/vpm450m.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wct4xxp/vpm450m.c b/wct4xxp/vpm450m.c index a5ee941..925ba76 100644 --- a/wct4xxp/vpm450m.c +++ b/wct4xxp/vpm450m.c @@ -407,6 +407,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f 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 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f 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 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f } } + local_irq_restore(flags); kfree(ChipOpen); kfree(ChannelOpen); return vpm450m; |