<br><font size=2 face="sans-serif">Here is the patch against the most recent
bit. Please review it.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Signed-off-by: Shirley Ma <xma@us.ibm.com></font><font size=3> </font>
<br>
<div>
<br><font size=2 face="sans-serif">diff -urpN infiniband/ulp/ipoib/ipoib_main.c
infiniband-pathfree/ulp/ipoib/ipoib_main.c<br>
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-24
18:06:15.000000000 +0000<br>
+++ infiniband-pathfree/ulp/ipoib/ipoib_main.c        2005-02-24
18:28:58.000000000 +0000<br>
@@ -215,15 +215,17 @@ static int __path_add(struct net_device <br>
         return 0;<br>
 }<br>
 <br>
-static void __path_free(struct net_device *dev, struct ipoib_path *path)<br>
+static void path_free(struct net_device *dev, struct ipoib_path *path)<br>
 {<br>
         struct ipoib_dev_priv *priv = netdev_priv(dev);<br>
         struct ipoib_neigh *neigh, *tn;<br>
         struct sk_buff *skb;<br>
+        unsigned long flags;<br>
 <br>
         while ((skb = __skb_dequeue(&path->queue)))<br>
                 dev_kfree_skb_irq(skb);<br>
 <br>
+        spin_lock_irqsave(&priv->lock,
flags);<br>
         list_for_each_entry_safe(neigh, tn,
&path->neigh_list, list) {<br>
                 if
(neigh->ah)<br>
                  
      ipoib_put_ah(neigh->ah);<br>
@@ -231,13 +233,16 @@ static void __path_free(struct net_devic<br>
                 neigh->neighbour->ops->destructor
= NULL;<br>
                 kfree(neigh);<br>
         }<br>
+        spin_unlock_irqrestore(&priv->lock,
flags);<br>
 <br>
         if (path->ah)</font>
<br><font size=2 face="sans-serif">         
       ipoib_put_ah(path->ah);<br>
 <br>
+        spin_lock_irqsave(&priv->lock,
flags);<br>
         rb_erase(&path->rb_node, &priv->path_tree);<br>
         list_del(&path->list);<br>
         kfree(path);<br>
+        spin_unlock_irqrestore(&priv->lock,
flags);<br>
 }<br>
 <br>
 void ipoib_flush_paths(struct net_device *dev)<br>
@@ -256,7 +261,7 @@ void ipoib_flush_paths(struct net_device<br>
                 if
(path->query)<br>
                  
      ib_sa_cancel_query(path->query_id, path->query);<br>
                 wait_for_completion(&path->done);<br>
-                __path_free(dev,
path);<br>
+                path_free(dev,
path);<br>
         }<br>
 }<br>
 <br>
@@ -496,8 +501,11 @@ static void unicast_arp_send(struct sk_b<br>
                  
      skb_push(skb, sizeof *phdr);<br>
                  
      __skb_queue_tail(&path->queue, skb);<br>
 <br>
-                
       if (path_rec_start(dev, path))<br>
-                
               __path_free(dev,
path);<br>
+                
       if (path_rec_start(dev, path)) {<br>
+                
               spin_unlock(&priv->lock);<br>
+                
               path_free(dev,
path);<br>
+                
               return;<br>
+                
       }<br>
                 }
else {<br>
                  
      ++priv->stats.tx_dropped;<br>
                  
      dev_kfree_skb_any(skb);</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Thanks<br>
Shirley Ma<br>
IBM Linux Technology Center<br>
15300 SW Koll Parkway<br>
Beaverton, OR 97006-6063<br>
Phone(Fax): (503) 578-7638<br>
<br>
</font></div>