From: Shirley Ma <[EMAIL PROTECTED]>

Change uses of list_for_each_entry() where the loop variable is freed
inside the loop to list_for_each_entry_safe().

Signed-off-by: Shirley Ma <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>


--- linux-export.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c    
2005-03-02 20:26:02.832873236 -0800
+++ linux-export/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-02 
20:26:12.799709771 -0800
@@ -790,7 +790,7 @@
 
        spin_unlock_irqrestore(&priv->lock, flags);
 
-       list_for_each_entry(mcast, &remove_list, list) {
+       list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
                ipoib_mcast_leave(dev, mcast);
                ipoib_mcast_free(mcast);
        }
@@ -902,7 +902,7 @@
        spin_unlock_irqrestore(&priv->lock, flags);
 
        /* We have to cancel outside of the spinlock */
-       list_for_each_entry(mcast, &remove_list, list) {
+       list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
                ipoib_mcast_leave(mcast->dev, mcast);
                ipoib_mcast_free(mcast);
        }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to