On Thu, 25 Jul 2013 15:56:20 +0200 Linus Lüssing <linus.luessing@xxxxxx> wrote: > > +static void br_multicast_update_querier_timer(struct net_bridge *br, > + unsigned long max_delay) > +{ > + if (!timer_pending(&br->multicast_querier_timer)) > + atomic64_set(&br->multicast_querier_delay_time, > + jiffies + max_delay); > + > + mod_timer(&br->multicast_querier_timer, > + jiffies + br->multicast_querier_interval); > +} > + Isn't this test racing with timer expiration. static void br_multicast_update_querier_timer(struct net_bridge *br, unsigned long max_delay) { if (!timer_pending(&br->multicast_querier_timer)) atomic64_set(&br->multicast_querier_delay_time, jiffies + max_delay); What if timer completes here? mod_timer(&br->multicast_querier_timer, jiffies + br->multicast_querier_interval); } And another race if timer goes off? static void br_multicast_update_querier_timer(struct net_bridge *br, unsigned long max_delay) { if (!timer_pending(&br->multicast_querier_timer)) atomic64_set(&br->multicast_querier_delay_time, jiffies + max_delay); Timer fires here...? mod_timer(&br->multicast_querier_timer, jiffies + br->multicast_querier_interval); }