diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2010-11-02 01:52:05 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-03 18:50:06 -0700 |
commit | 58c490babd4b425310363cbd1f406d7e508f77a5 (patch) | |
tree | 48b4697403815b06da6a6dcf4c3495bd1401a51f /net/rds/loop.c | |
parent | 53ab2221da7676dd0f161bec5e1520e56b74a865 (diff) | |
download | linux-58c490babd4b425310363cbd1f406d7e508f77a5.tar.bz2 |
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@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/loop.c')
-rw-r--r-- | net/rds/loop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rds/loop.c b/net/rds/loop.c index c390156b426f..aeec1d483b17 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); } |