RDS: Fix panic on unload
authorAndy Grover <andy.grover@oracle.com>
Fri, 30 Oct 2009 08:51:55 +0000 (08:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Oct 2009 22:06:38 +0000 (15:06 -0700)
Remove explicit destruction of passive connection when destroying
active end of the connection. The passive end is also on the
device's connection list, and will thus be cleaned up properly.
Panic was caused by trying to clean it up twice.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib_rdma.c
net/rds/iw_rdma.c

index ef3ab5b7283e9ce908b0cc4633728707b1a9999b..c5e916598c14bd950f8a3d4a6b89cdb567389cb6 100644 (file)
@@ -187,11 +187,8 @@ void __rds_ib_destroy_conns(struct list_head *list, spinlock_t *list_lock)
        INIT_LIST_HEAD(list);
        spin_unlock_irq(list_lock);
 
-       list_for_each_entry_safe(ic, _ic, &tmp_list, ib_node) {
-               if (ic->conn->c_passive)
-                       rds_conn_destroy(ic->conn->c_passive);
+       list_for_each_entry_safe(ic, _ic, &tmp_list, ib_node)
                rds_conn_destroy(ic->conn);
-       }
 }
 
 struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *rds_ibdev)
index de4a1b16bf7b070814c6ff4d7f92fbce4e2e906b..b25d785e49fc05b11d974cae1054b6c5d656d338 100644 (file)
@@ -245,11 +245,8 @@ void __rds_iw_destroy_conns(struct list_head *list, spinlock_t *list_lock)
        INIT_LIST_HEAD(list);
        spin_unlock_irq(list_lock);
 
-       list_for_each_entry_safe(ic, _ic, &tmp_list, iw_node) {
-               if (ic->conn->c_passive)
-                       rds_conn_destroy(ic->conn->c_passive);
+       list_for_each_entry_safe(ic, _ic, &tmp_list, iw_node)
                rds_conn_destroy(ic->conn);
-       }
 }
 
 static void rds_iw_set_scatterlist(struct rds_iw_scatterlist *sg,