Commit 58c490ba authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller

rds: Lost locking in loop connection freeing

The conn is removed from list in there and this requires
proper lock protection.
Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53ab2221
...@@ -134,8 +134,12 @@ static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp) ...@@ -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) static void rds_loop_conn_free(void *arg)
{ {
struct rds_loop_connection *lc = arg; struct rds_loop_connection *lc = arg;
unsigned long flags;
rdsdebug("lc %p\n", lc); rdsdebug("lc %p\n", lc);
spin_lock_irqsave(&loop_conns_lock, flags);
list_del(&lc->loop_node); list_del(&lc->loop_node);
spin_unlock_irqrestore(&loop_conns_lock, flags);
kfree(lc); kfree(lc);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment