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@xorcom.com>
Acked-By: Oron Peled <oron.peled@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10056 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Tzafrir Cohen
2011-07-20 16:50:14 +00:00
parent 47823b3a74
commit b2f71aa2b8

View File

@@ -3065,6 +3065,7 @@ static void dahdi_free_pseudo(struct dahdi_chan *chan)
if (!chan)
return;
mutex_lock(&registration_mutex);
pseudo = chan_to_pseudo(chan);
spin_lock_irqsave(&chan_lock, flags);
@@ -3073,6 +3074,7 @@ static void dahdi_free_pseudo(struct dahdi_chan *chan)
spin_unlock_irqrestore(&chan_lock, flags);
dahdi_chan_unreg(chan);
mutex_unlock(&registration_mutex);
kfree(pseudo);
}