Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ray_cs: replace del_timer by del_timer_sync

Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exits.

This change was suggested by Thomas Gleixner.

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

// <smpl>
@r@
identifier i,t,ex;
@@
struct t i = { .remove = ex, };

@@
identifier r.ex;
@@
ex(...) {
<...
- del_timer
+ del_timer_sync
(...)
...>
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Julia Lawall and committed by
John W. Linville
360298c1 294bc611

+1 -1
+1 -1
drivers/net/wireless/ray_cs.c
··· 343 343 ray_release(link); 344 344 345 345 local = netdev_priv(dev); 346 - del_timer(&local->timer); 346 + del_timer_sync(&local->timer); 347 347 348 348 if (link->priv) { 349 349 unregister_netdev(dev);