aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2009-10-30 04:51:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 18:06:38 -0400
commit433d308dd85e506bb6529177cc0f997627d87ed6 (patch)
tree79d1862f71c708ce4488db488a846f89b88c6abe /net/rds
parent86357b19bcabd9355937f3fb84f90ba9fe76a5d3 (diff)
RDS: Fix panic on unload
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>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib_rdma.c5
-rw-r--r--net/rds/iw_rdma.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index ef3ab5b7283e..c5e916598c14 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -187,11 +187,8 @@ void __rds_ib_destroy_conns(struct list_head *list, spinlock_t *list_lock)
187 INIT_LIST_HEAD(list); 187 INIT_LIST_HEAD(list);
188 spin_unlock_irq(list_lock); 188 spin_unlock_irq(list_lock);
189 189
190 list_for_each_entry_safe(ic, _ic, &tmp_list, ib_node) { 190 list_for_each_entry_safe(ic, _ic, &tmp_list, ib_node)
191 if (ic->conn->c_passive)
192 rds_conn_destroy(ic->conn->c_passive);
193 rds_conn_destroy(ic->conn); 191 rds_conn_destroy(ic->conn);
194 }
195} 192}
196 193
197struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *rds_ibdev) 194struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *rds_ibdev)
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
index de4a1b16bf7b..b25d785e49fc 100644
--- a/net/rds/iw_rdma.c
+++ b/net/rds/iw_rdma.c
@@ -245,11 +245,8 @@ void __rds_iw_destroy_conns(struct list_head *list, spinlock_t *list_lock)
245 INIT_LIST_HEAD(list); 245 INIT_LIST_HEAD(list);
246 spin_unlock_irq(list_lock); 246 spin_unlock_irq(list_lock);
247 247
248 list_for_each_entry_safe(ic, _ic, &tmp_list, iw_node) { 248 list_for_each_entry_safe(ic, _ic, &tmp_list, iw_node)
249 if (ic->conn->c_passive)
250 rds_conn_destroy(ic->conn->c_passive);
251 rds_conn_destroy(ic->conn); 249 rds_conn_destroy(ic->conn);
252 }
253} 250}
254 251
255static void rds_iw_set_scatterlist(struct rds_iw_scatterlist *sg, 252static void rds_iw_set_scatterlist(struct rds_iw_scatterlist *sg,