Skip to content

Commit

Permalink
RDS: Fix panic on unload
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Andy Grover authored and davem330 committed Oct 30, 2009
1 parent 86357b1 commit 433d308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions net/rds/ib_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions net/rds/iw_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 433d308

Please sign in to comment.