Commit 8200a59f24aeca379660f80658a8c0c343ca5c31
Committed by
David S. Miller
1 parent
58c490babd
Exists in
master
and in
4 other branches
rds: Remove kfreed tcp conn from list
All the rds_tcp_connection objects are stored list, but when being freed it should be removed from there. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff
net/rds/tcp.c
... | ... | @@ -221,7 +221,13 @@ |
221 | 221 | static void rds_tcp_conn_free(void *arg) |
222 | 222 | { |
223 | 223 | struct rds_tcp_connection *tc = arg; |
224 | + unsigned long flags; | |
224 | 225 | rdsdebug("freeing tc %p\n", tc); |
226 | + | |
227 | + spin_lock_irqsave(&rds_tcp_conn_lock, flags); | |
228 | + list_del(&tc->t_tcp_node); | |
229 | + spin_unlock_irqrestore(&rds_tcp_conn_lock, flags); | |
230 | + | |
225 | 231 | kmem_cache_free(rds_tcp_conn_slab, tc); |
226 | 232 | } |
227 | 233 |