[svn-commits] tzafrir: linux/trunk r9090 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 5 16:05:15 CDT 2010


Author: tzafrir
Date: Thu Aug  5 16:05:11 2010
New Revision: 9090

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9090
Log:
don't crash on disconnecting of AB

This is a regression from r8985 . The temporary 'module' was there because
the pointer 'chan' may become invalid after the close function.

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=9090&r1=9089&r2=9090
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Aug  5 16:05:11 2010
@@ -2771,9 +2771,11 @@
 		spin_unlock_irqrestore(&chan->lock, flags);
 		close_channel(chan);
 		if (chan->span) {
+			struct module *owner = chan->span->ops->owner;
+
 			if (chan->span->ops->close)
 				res = chan->span->ops->close(chan);
-			module_put(chan->span->ops->owner);
+			module_put(owner);
 		}
 		/* The channel might be destroyed by low-level driver span->close() */
 		if (chans[unit])




More information about the svn-commits mailing list