[rds-devel] [PATCH] RDS/iWARP: rds_ib_remove_one() - serialize cm_id list access.

Steve Wise swise at opengridcomputing.com
Tue Jan 13 11:29:00 PST 2009


From: Steve Wise <swise at opengridcomputing.com>

Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---

 drivers/infiniband/ulp/rds/iw.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/ulp/rds/iw.c b/drivers/infiniband/ulp/rds/iw.c
index 100c0b0..f69b21a 100644
--- a/drivers/infiniband/ulp/rds/iw.c
+++ b/drivers/infiniband/ulp/rds/iw.c
@@ -144,10 +144,12 @@ void rds_ib_remove_one(struct ib_device *device)
 	if (!rds_ibdev)
 		return;
 
+	spin_lock_irq(&rds_ibdev->spinlock);
 	list_for_each_entry_safe(i_cm_id, next, &rds_ibdev->cm_id_list, list) {
 		list_del(&i_cm_id->list);
 		kfree(i_cm_id);
 	}
+	spin_unlock_irq(&rds_ibdev->spinlock);
 
 	rds_ib_remove_conns(rds_ibdev);
 



More information about the rds-devel mailing list