atm: replace del_timer by del_timer_sync
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 26 Mar 2014 21:33:40 +0000 (22:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Mar 2014 19:28:06 +0000 (15:28 -0400)
Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exists.

This change was suggested by Thomas Gleixner.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
declarer name module_exit;
identifier ex;
@@

module_exit(ex);

@@
identifier r.ex;
@@

ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/atm/mpc.c

index b71ff6b234f2bb1c6d97915eb5a4fb6ab4d1851d..91dc58f1124dd976e4cca35af2407eb2c0e25ecc 100644 (file)
@@ -1492,7 +1492,7 @@ static void __exit atm_mpoa_cleanup(void)
 
        mpc_proc_clean();
 
-       del_timer(&mpc_timer);
+       del_timer_sync(&mpc_timer);
        unregister_netdevice_notifier(&mpoa_notifier);
        deregister_atm_ioctl(&atm_ioctl_ops);
 
This page took 0.025483 seconds and 5 git commands to generate.