diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-07-20 16:50:14 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-07-20 16:50:14 +0000 |
commit | 9dde6151032e196d4eb3c71d8637d6a9062c6d0d (patch) | |
tree | 8c82bbdbd25563d69101fd90e32af9d9e5199d70 /drivers | |
parent | d05d0b9ea8b75250c8c49c976df1c585971b272b (diff) |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 01931ad..1ea92f6 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -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); } |