It looks like a timer function can be running and rearm
the timer after removing a ipv6 module.


Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>

---

diff -Nurp 2.6.22-rc7-/net/ipv6/addrconf.c 2.6.22-rc7/net/ipv6/addrconf.c
--- 2.6.22-rc7-/net/ipv6/addrconf.c     2007-07-02 09:03:29.000000000 +0200
+++ 2.6.22-rc7/net/ipv6/addrconf.c      2007-07-05 12:27:22.000000000 +0200
@@ -2957,8 +2957,11 @@ restart:
                read_unlock(&addrconf_hash_lock);
        }
 
-       addr_chk_timer.expires = time_before(next, jiffies + HZ) ? jiffies + HZ 
: next;
-       add_timer(&addr_chk_timer);
+       if (ipv6_dev_notf.notifier_call) {      /* exit time? */
+               addr_chk_timer.expires = time_before(next, jiffies + HZ)
+                                                       ? jiffies + HZ : next;
+               add_timer(&addr_chk_timer);
+       }
        spin_unlock_bh(&addrconf_verify_lock);
 }
 
@@ -4281,9 +4284,13 @@ void __exit addrconf_cleanup(void)
                         */
                }
        }
+
+       /* now exit flag for a timer... */
+       ipv6_dev_notf.notifier_call = NULL;
        write_unlock_bh(&addrconf_hash_lock);
 
-       del_timer(&addr_chk_timer);
+       if (!del_timer_sync(&addr_chk_timer))
+               del_timer_sync(&addr_chk_timer);
 
        rtnl_unlock();
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to