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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 20 11:50:18 CDT 2011


Author: tzafrir
Date: Wed Jul 20 11:50:14 2011
New Revision: 10056

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10056
Log:
get registration_mutex at free_pseudo

Make sure that the call to dahdi_chan_unreg() in free_pseudo() is
protected by the registration_mutex, like the other calls to that
function.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Acked-By: Oron Peled <oron.peled at xorcom.com>
Acked-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=10056&r1=10055&r2=10056
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Jul 20 11:50:14 2011
@@ -3065,6 +3065,7 @@
 	if (!chan)
 		return;
 
+	mutex_lock(&registration_mutex);
 	pseudo = chan_to_pseudo(chan);
 
 	spin_lock_irqsave(&chan_lock, flags);
@@ -3073,6 +3074,7 @@
 	spin_unlock_irqrestore(&chan_lock, flags);
 
 	dahdi_chan_unreg(chan);
+	mutex_unlock(&registration_mutex);
 	kfree(pseudo);
 }
 




More information about the svn-commits mailing list