* [PATCH] rds: Remove kfreed tcp conn from list
@ 2010-11-02 11:54 Pavel Emelyanov
0 siblings, 0 replies; only message in thread
From: Pavel Emelyanov @ 2010-11-02 11:54 UTC (permalink / raw)
To: Andy Grover, David Miller; +Cc: rds-devel, Linux Netdev 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>
---
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 08a8c6c..8e0a320 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -221,7 +221,13 @@ static int rds_tcp_conn_alloc(struct rds_connection *conn, gfp_t gfp)
static void rds_tcp_conn_free(void *arg)
{
struct rds_tcp_connection *tc = arg;
+ unsigned long flags;
rdsdebug("freeing tc %p\n", tc);
+
+ spin_lock_irqsave(&rds_tcp_conn_lock, flags);
+ list_del(&tc->t_tcp_node);
+ spin_unlock_irqrestore(&rds_tcp_conn_lock, flags);
+
kmem_cache_free(rds_tcp_conn_slab, tc);
}
--
1.5.5.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-02 11:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 11:54 [PATCH] rds: Remove kfreed tcp conn from list Pavel Emelyanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox