aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2012-12-13 20:02:36 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-14 13:14:07 -0500
commit4a0ae7b0a9e55db9b85f8abda623f145311eb951 (patch)
tree506c5e09cc6d86e7a7a644b72db3e98c58fe84b9 /drivers/isdn
parent4008e97f866db66511f065ae9052e0733a3a8429 (diff)
mISDN: fix race in timer canceling on module unloading
Using timer_pending() without additional syncronization is racy, del_timer_sync() must be used here for waiting in-flight handler. Bug caught with help from "debug-objects" during random insmod/rmmod. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: David S. Miller <davem@davemloft.net> Cc: netdev <netdev@vger.kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/mISDN/dsp_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 28c99c623bcd..22b720ec80cb 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -1217,8 +1217,7 @@ static void __exit dsp_cleanup(void)
1217{ 1217{
1218 mISDN_unregister_Bprotocol(&DSP); 1218 mISDN_unregister_Bprotocol(&DSP);
1219 1219
1220 if (timer_pending(&dsp_spl_tl)) 1220 del_timer_sync(&dsp_spl_tl);
1221 del_timer(&dsp_spl_tl);
1222 1221
1223 if (!list_empty(&dsp_ilist)) { 1222 if (!list_empty(&dsp_ilist)) {
1224 printk(KERN_ERR "mISDN_dsp: Audio DSP object inst list not " 1223 printk(KERN_ERR "mISDN_dsp: Audio DSP object inst list not "