[svn-commits] sruffell: linux/trunk r9530 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Dec 13 08:57:19 CST 2010
Author: sruffell
Date: Mon Dec 13 08:57:12 2010
New Revision: 9530
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9530
Log:
dahdi: Do not dereference chan->span for pseudo channels.
Fixes a regression introduced in r9510 which saves a pointer to the ops
member of a channel's span before checking if the channel is a pseudo.
Psuedo channels do not have spans.
(issue #18463)
(issue #18422)
Reported by: alecdavis
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9530&r1=9529&r2=9530
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Dec 13 08:57:12 2010
@@ -2739,7 +2739,6 @@
res = -EBUSY;
else if (!test_and_set_bit(DAHDI_FLAGBIT_OPEN, &chan->flags)) {
unsigned long flags;
- const struct dahdi_span_ops *ops;
res = initialize_channel(chan);
if (res) {
/* Reallocbufs must have failed */
@@ -2747,10 +2746,11 @@
return res;
}
spin_lock_irqsave(&chan->lock, flags);
- ops = chan->span->ops;
if (is_pseudo_chan(chan))
chan->flags |= DAHDI_FLAG_AUDIO;
if (chan->span) {
+ const struct dahdi_span_ops *const ops =
+ chan->span->ops;
if (!try_module_get(ops->owner)) {
res = -ENXIO;
} else if (ops->open) {
More information about the svn-commits
mailing list