Stephen Hemminger
2015-Jul-23 16:59 UTC
[Bridge] [PATCH net] bridge: stp: when using userspace stp stop kernel hello and hold timers
On Thu, 23 Jul 2015 09:07:37 -0700 Nikolay Aleksandrov <nikolay at cumulusnetworks.com> wrote:> + /* Stop hello and hold timer */ > + spin_lock_bh(&br->lock); > + del_timer(&br->hello_timer); > + list_for_each_entry(p, &br->port_list, list) > + del_timer(&p->hold_timer); > + spin_unlock_bh(&br->lock);Wouldn't it be easier to use del_timer_sync here?
Nikolay Aleksandrov
2015-Jul-23 17:05 UTC
[Bridge] [PATCH net] bridge: stp: when using userspace stp stop kernel hello and hold timers
On 07/23/2015 06:59 PM, Stephen Hemminger wrote:> On Thu, 23 Jul 2015 09:07:37 -0700 > Nikolay Aleksandrov <nikolay at cumulusnetworks.com> wrote: > >> + /* Stop hello and hold timer */ >> + spin_lock_bh(&br->lock); >> + del_timer(&br->hello_timer); >> + list_for_each_entry(p, &br->port_list, list) >> + del_timer(&p->hold_timer); >> + spin_unlock_bh(&br->lock); > > Wouldn't it be easier to use del_timer_sync here? >I think it should work. Also I have an error in the commit message about the kernel BPDU sending which I need to correct. I'll prepare a v2 with your suggestion and fixed commit message. Thanks, Nik