Re: [tipc-discussion] [PATCH net-next v3 1/1] tipc: fix crash during node removal

2016-02-23 Thread jason
On Feb 23, 2016 6:20 PM, "Xue, Ying" wrote: > > Even if node timeout function restarts the node timer with mod_timer(), I don’t see any problem here. If you concern the usage about dealing with node timer and its refcount, please look at another similar example which can demonstrate how to maintai

Re: [tipc-discussion] [PATCH net-next v3 1/1] tipc: fix crash during node removal

2016-02-23 Thread Jon Maloy
Ying, del_timer() definitely returns 1 after the timer function has called mod_timer(), which is the case here. After mod_timer() has been called, the timer is active, no matter its previous state and return value. So, in the brief interval between mod_timer() and tipc_node_get() this scenario c

Re: [tipc-discussion] [PATCH net-next v3 1/1] tipc: fix crash during node removal

2016-02-23 Thread Xue, Ying
Even if node timeout function restarts the node timer with mod_timer(), I don’t see any problem here. If you concern the usage about dealing with node timer and its refcount, please look at another similar example which can demonstrate how to maintain the relationship between sk_timer and sk_ref

Re: [tipc-discussion] [PATCH net-next v3 1/1] tipc: fix crash during node removal

2016-02-23 Thread jason
On Feb 22, 2016 11:22 PM, "Xue, Ying" wrote: > > Hi Jon, > > I think the scenario described below is not true. This is because del_timer() doesn't return 1 while node_timeout() is being called. Please take a look at __run_timers() defined in kernel/time/timer.c. When a timer is expired, __run_time