>> Please explain why commit 333f796235a527 introduces the soft lockup. > [partha] > Before commit 333f796235a527, the tipc_conn_shutdown() was always called > from tipc_close_conn() i.e in the context of tipc_topsrv_stop(). > In that context, we are allowed to grab the nametbl_lock. > > In commit 333f796235a527, i moved the tipc_conn_release (renamed from > tipc_conn_shutdown) to the connection refcount cleanup. This allows > either tipc_nametbl_withdraw() or tipc_topsrv_stop() to perform > tipc_sock_release(). > > The fact that tipc_exit_net() first calls tipc_topsrv_stop() and then > tipc_net_stop()->tipc_nametble_withdraw() increases the chances for the > later to perform the connection cleanup.
It's better to add the words above into patch comment, which help other user understand how the issue is introduced. >> >> I could not understand why we move tipc_nametbl_withdraw to here. > [partha] > Otherwise we call tipc_topsrv_stop() before tipc_nametbl_withdraw(), > which might lead to: > - soft lockup > - its too late to actually notify the subscribers, as the topology > server might already have started shutting down. > I couldn't just change the existing order as tipc_net_stop() does a lot > more than just tipc_nametbl_withdraw(). Agreed. >> > [partha] > Thanks for the good suggestion. In addition, i can remove the variable > total and use s->idr_in_use as exit criteria. > like: for (id = 0; s->idr_in_use; id++) Good. Regards, Ying ------------------------------------------------------------------------------ _______________________________________________ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tipc-discussion