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:
@@ -3065,6 +3065,7 @@ static void dahdi_free_pseudo(struct dahdi_chan *chan)
|
||||
if (!chan)
|
||||
return;
|
||||
|
||||
mutex_lock(®istration_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(®istration_mutex);
|
||||
kfree(pseudo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user