From: Chris Mason Date: Tue, 11 May 2010 22:14:52 +0000 (-0700) Subject: RDS: use locking on the connection hash list X-Git-Tag: upstream/snapshot3+hdmi~12689^2~499^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abf454398c2ebafc629ebb8b149f5a752c79e919;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git RDS: use locking on the connection hash list rds_conn_destroy really needs locking while it changes the connection hash. Signed-off-by: Chris Mason --- diff --git a/net/rds/connection.c b/net/rds/connection.c index 9c249f3..87df15b 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -321,7 +321,10 @@ void rds_conn_destroy(struct rds_connection *conn) "%pI4\n", conn, &conn->c_laddr, &conn->c_faddr); + /* Ensure conn will not be scheduled for reconnect */ + spin_lock_irq(&rds_conn_lock); hlist_del_init(&conn->c_hash_node); + spin_unlock_irq(&rds_conn_lock); /* wait for the rds thread to shut it down */ atomic_set(&conn->c_state, RDS_CONN_ERROR);