diff options
author | Shaun Ruffell <sruffell@digium.com> | 2009-06-18 18:03:26 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2009-06-18 18:03:26 +0000 |
commit | 7faf82470fbbbcd8ee6f0e208a823931b315410c (patch) | |
tree | e6356bc17b8c3cb3a844c3384ed6033537e5e864 /drivers/dahdi/wctdm.c | |
parent | e7313c6472310b8290246292e4151ac93f6eea35 (diff) |
wctdm, wctdm24xxp, wcfxo: Fix calls to dahdi_hooksig.
When JAPAN, AUDIO_RINGCHECK, or ZERO_BATT_RING compile time options are
selected it is possible to get a kernel panic due to an invalid pointer passed
to the dahdi_hooksig function.
(closes issue #15350)
Patch by: alecdavis
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6692 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm.c')
-rw-r--r-- | drivers/dahdi/wctdm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index 2859164..d6722a8 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -378,14 +378,14 @@ static inline void ring_check(struct wctdm *wc, int card) if (debug) printk(KERN_DEBUG "RING on %d/%d!\n", wc->span.spanno, card + 1); if (!wc->mod[card].fxo.offhook) - dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_RING); + dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_RING); wc->mod[card].fxo.ring = 1; } if (wc->mod[card].fxo.ring && !wc->mod[card].fxo.pegcount) { /* No more ring */ if (debug) printk(KERN_DEBUG "NO RING on %d/%d!\n", wc->span.spanno, card + 1); - dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK); + dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK); wc->mod[card].fxo.ring = 0; } } @@ -864,7 +864,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) printk(KERN_DEBUG "NO BATTERY on %d/%d!\n", wc->span.spanno, card + 1); #ifdef JAPAN if (!wc->ohdebounce && wc->offhook) { - dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_ONHOOK); + dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_ONHOOK); if (debug) printk(KERN_DEBUG "Signalled On Hook\n"); #ifdef ZERO_BATT_RING @@ -908,7 +908,7 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) #ifdef ZERO_BATT_RING if (wc->onhook) { wc->onhook = 0; - dahdi_hooksig(&wc->chans[card], DAHDI_RXSIG_OFFHOOK); + dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK); if (debug) printk(KERN_DEBUG "Signalled Off Hook\n"); } |