summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2012-04-03 19:44:37 +0000
committerShaun Ruffell <sruffell@digium.com>2012-04-03 19:44:37 +0000
commit104e8941cd713220e19c50df72a8ece7611303e6 (patch)
tree03e9131fd6a1f4a02d83ca95abc21f4b760caa22
parent600a595990b4a3ffb5cdfbe98b532ef5f43e7161 (diff)
dahdi_dynamic: Close race on unload if red alarm timer was running when unloaded.
I saw a kernel oops that was the result of the timer running after the dahdi_dynamic module was unloaded. Now we wait for the timer to complete, and then delete it again in case it reactivated itself. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10625 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi_dynamic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c
index 4be55ae..b9f400f 100644
--- a/drivers/dahdi/dahdi_dynamic.c
+++ b/drivers/dahdi/dahdi_dynamic.c
@@ -857,6 +857,9 @@ static void dahdi_dynamic_cleanup(void)
tasklet_kill(&dahdi_dynamic_tlet);
}
#endif
+ del_timer_sync(&alarmcheck);
+ /* Must call again in case it was running before and rescheduled
+ * itself. */
del_timer(&alarmcheck);
printk(KERN_INFO "DAHDI Dynamic Span support unloaded\n");
}