From 9dde6151032e196d4eb3c71d8637d6a9062c6d0d Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 20 Jul 2011 16:50:14 +0000 Subject: 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 Acked-By: Oron Peled Acked-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10056 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/dahdi/dahdi-base.c') 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); } -- cgit v1.2.3