public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] rds: Lost locking in loop connection freeing
@ 2010-11-02 11:52 Pavel Emelyanov
  0 siblings, 0 replies; only message in thread
From: Pavel Emelyanov @ 2010-11-02 11:52 UTC (permalink / raw)
  To: Andy Grover, David Miller; +Cc: rds-devel, Linux Netdev List

The conn is removed from list in there and this requires
proper lock protection.

Signed-off-by: Pavel Emelyanov <xemul@openvz•org>

---

diff --git a/net/rds/loop.c b/net/rds/loop.c
index c390156..aeec1d4 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -134,8 +134,12 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp)
 static void rds_loop_conn_free(void *arg)
 {
 	struct rds_loop_connection *lc = arg;
+	unsigned long flags;
+
 	rdsdebug("lc %p\n", lc);
+	spin_lock_irqsave(&loop_conns_lock, flags);
 	list_del(&lc->loop_node);
+	spin_unlock_irqrestore(&loop_conns_lock, flags);
 	kfree(lc);
 }
 
-- 
1.5.5.6


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-02 11:52 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:52 [PATCH] rds: Lost locking in loop connection freeing Pavel Emelyanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox