[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4CCFFB65.6000404@parallels.com>
Date: Tue, 02 Nov 2010 14:52:05 +0300
From: Pavel Emelyanov <xemul@...allels.com>
To: Andy Grover <andy.grover@...cle.com>,
David Miller <davem@...emloft.net>
CC: rds-devel@....oracle.com,
Linux Netdev List <netdev@...r.kernel.org>
Subject: [PATCH] rds: Lost locking in loop connection freeing
The conn is removed from list in there and this requires
proper lock protection.
Signed-off-by: Pavel Emelyanov <xemul@...nvz.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists