|
@@ -306,7 +306,8 @@ static void rds_tcp_conn_free(void *arg)
|
|
|
rdsdebug("freeing tc %p\n", tc);
|
|
|
|
|
|
spin_lock_irqsave(&rds_tcp_conn_lock, flags);
|
|
|
- list_del(&tc->t_tcp_node);
|
|
|
+ if (!tc->t_tcp_node_detached)
|
|
|
+ list_del(&tc->t_tcp_node);
|
|
|
spin_unlock_irqrestore(&rds_tcp_conn_lock, flags);
|
|
|
|
|
|
kmem_cache_free(rds_tcp_conn_slab, tc);
|
|
@@ -510,8 +511,12 @@ static void rds_tcp_kill_sock(struct net *net)
|
|
|
|
|
|
if (net != c_net || !tc->t_sock)
|
|
|
continue;
|
|
|
- if (!list_has_conn(&tmp_list, tc->t_cpath->cp_conn))
|
|
|
+ if (!list_has_conn(&tmp_list, tc->t_cpath->cp_conn)) {
|
|
|
list_move_tail(&tc->t_tcp_node, &tmp_list);
|
|
|
+ } else {
|
|
|
+ list_del(&tc->t_tcp_node);
|
|
|
+ tc->t_tcp_node_detached = true;
|
|
|
+ }
|
|
|
}
|
|
|
spin_unlock_irq(&rds_tcp_conn_lock);
|
|
|
list_for_each_entry_safe(tc, _tc, &tmp_list, t_tcp_node)
|